Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
gpderetta
7mo ago
0 comments
Save
Share
Wouldn't two counters report "([)]" as being properly balanced?
0 comments
1 comments · 1 top-level
top
newest
oldest
jibal
7mo ago
No, 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 ([).
j
/
k
navigate · click thread line to collapse