3 ms·
I think your algo just checks if there are exact number of open and closed brackets, but it doesn't check that they actually match together in a valid way.
by ChuckNorris89 4y ago
I think your algo just checks if there are exact number of open and closed brackets, but it doesn't check that they actually match together in a valid way.
- bell-cot 4y agoDo you mean input such as ")(" or "())("? (If so, that would trigger the "Negative Nesting Level" error.)