contents: rearrange algo layout structure

This commit is contained in:
Yangshun
2022-04-06 09:47:25 +08:00
parent 0acd6749ca
commit 73dd64f96d
16 changed files with 151 additions and 147 deletions

View File

@ -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