Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
msoad
11y ago
0 comments
Save
Share
You can still use an index for each symbol and track diff of child vs. parent and make sure it's never negative.
0 comments
1 comments · 1 top-level
top
newest
oldest
nitishmd
11y ago
Wouldn't the worst case space complexity be the same then? for eg: ( { [ ] } ) as you will be keeping index for each the symbols. Technically it can be implemented, but isn't stack a better approach?
j
/
k
navigate · click thread line to collapse