Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
It is a bit fuzzy but "determines if the order of the parentheses is valid" from the problem description leads to returning true for empty strings. There are no invalid parenthesis in the empty string. But honestly that input is invalidated by the first sentance of the description so it likely should be out of scope.
I would suggest trying to go about another approach. Wrong or right (obviously it is wrong) this code would not fare well in an interview due to readability and being overly complex. Keep up the effort :)
This comment is hidden because it contains spoiler information about the solution