Back Clear
# Your Problem: # Given a string, return true if it is a nesting of zero or more pairs of # parenthesis, like "(())" or "((()))". Suggestion: check the first and last # chars, and then recur on what's inside them. # # # nestParen("(())") → true # nestParen("((()))") → true # nestParen("(((x))") → false # # Credit for this problem goes to Nick Parlante from CodingBat.com # Do not modify anything outside of the function or the function itself. # CODE START def getNestParen(str:str) -> bool: # CODE END # Press Ctrl+E (Command+E on mac) to test your code