mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-28 12:43:12 +08:00
contents: rearrange algo layout structure
This commit is contained in:
@ -12,6 +12,13 @@ This behavior is commonly called LIFO (last in, first out). The name "stack" for
|
||||
|
||||
Stacks are an important way of supporting nested or recursive function calls and is used to implement depth-first search. Depth-first search can be implemented using recursion or a manual stack.
|
||||
|
||||
## Learning resources
|
||||
|
||||
- Readings
|
||||
- [Stacks and Overflows](https://medium.com/basecs/stacks-and-overflows-dbcf7854dc67), basecs
|
||||
- Videos
|
||||
- [Stacks](https://www.coursera.org/lecture/data-structures/stacks-UdKzQ), University of California San Diego
|
||||
|
||||
## Implementations
|
||||
|
||||
| Language | API |
|
||||
@ -31,13 +38,6 @@ Stacks are an important way of supporting nested or recursive function calls and
|
||||
| isEmpty | O(1) |
|
||||
| Search | O(n) |
|
||||
|
||||
## Learning resources
|
||||
|
||||
- Readings
|
||||
- [Stacks and Overflows](https://medium.com/basecs/stacks-and-overflows-dbcf7854dc67), basecs
|
||||
- Videos
|
||||
- [Stacks](https://www.coursera.org/lecture/data-structures/stacks-UdKzQ), University of California San Diego
|
||||
|
||||
## Corner cases
|
||||
|
||||
- Empty stack. Popping from an empty stack
|
||||
|
Reference in New Issue
Block a user