You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
757 B
20 lines
757 B
---
|
|
id: stack
|
|
title: Stack
|
|
---
|
|
|
|
## Sample questions
|
|
|
|
- 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/)
|
|
- Sort a stack in ascending order using an additional stack.
|
|
|
|
## Recommended courses
|
|
|
|
import AlgorithmCourses from '../\_courses/AlgorithmCourses.md'
|
|
|
|
<AlgorithmCourses />
|