You are viewing a single comment's thread. Return to all comments →
I tested it on leetcode and it was actually much slower than the dict and stack solution (30ms v.s. 100ms). Great idea though!
Seems like cookies are disabled on this browser, please enable them to open this website
Stacks: Balanced Brackets
You are viewing a single comment's thread. Return to all comments →
I tested it on leetcode and it was actually much slower than the dict and stack solution (30ms v.s. 100ms). Great idea though!