USCIS has a record of what happened, so if you answer yes or no incorrectly they could say you lied. So whatever you answer, attach a written explanation of what happened and let them decide if they want to change the answer to yes or no accordingly.
As long as you don't hide anything and USCIS doesn't think you are hiding anything, you should not worry about this affecting your naturalization. Status violations prior to green card approval that are known to USCIS are not bars to naturalization. They ask that question because they want to know if you committed any offense that made you deportable, but were able to avoid deportation on a technicality or humanitarian grounds (e.g. your original country took away your citizenship so there is nowhere to which they can deport you, or you are the only living parent of an extremely ill US citizen child). In such cases, they are interested in whether the conditions that gave you relief are no longer applicable (e.g. your sick child has died) so they can deport you now, or whether the offense that put you in removal proceedings is a bar to naturalization, even if they can't deport you as a result of the relief.
So answer yes or no, attach a written explanation and you'll be OK. And bring the court records to the interview in case they ask for it.