News for hackers. Stuff that matters.
Re:Problem Solving with Algorithms and Data Structures by msoad on Thursday February 26, 2015 @03:28PM (#9115247)
You can still use an index for each symbol and track diff of child vs. parent and make sure it's never negative.
Re:Problem Solving with Algorithms and Data Structures by nitishmd on Thursday February 26, 2015 @04:36PM (#9115677)
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?