mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-30 05:34:33 +08:00
Squash commit
This commit is contained in:
8
algorithms/stack.md
Normal file
8
algorithms/stack.md
Normal file
@ -0,0 +1,8 @@
|
||||
Stack
|
||||
==
|
||||
|
||||
- Implementation of an interpreter for a small language that does multiplication/addition/etc.
|
||||
- Design a `MinStack` data structure that supports a `min()` operation that returns the minimum value in the stack in O(1) time.
|
||||
- Write an algorithm to determine if all of the delimiters in an expression are matched and closed.
|
||||
- E.g. `{ac[bb]}`, `[dklf(df(kl))d]{}` and `{[[[]]]}` are matched. But `{3234[fd` and `{df][d}` are not.
|
||||
- [Source](http://blog.gainlo.co/index.php/2016/09/30/uber-interview-question-delimiter-matching/)
|
Reference in New Issue
Block a user