3 ms·
Wouldn't two counters report "([)]" as being properly balanced?
by gpderetta 1y ago
Wouldn't two counters report "([)]" as being properly balanced?
- deleted 1y ago[deleted]
- jibal 1y agoNo, there's an open [ when the ) is encountered. The problem is the other way around -- my algorithm would report [() as an error. Oops, back to the drawing board. Clearly no counting can tell the difference between [() and ([).