X166: nestParen

Given a string, return true if it is a nesting of zero or more pairs of parentheses, like "(())" or "((()))". Suggestion: check the first and last characters, and then recurse on what's inside them.

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.