Stack
LIFO data structure
Stack
LIFO structure extending Vector.
Code Examples
Stack operations
java
1
2Stack<Integer> s = new Stack<>();
3s.push(10);
4s.pop();
5 Use Cases
- Undo, recursion
Common Mistakes to Avoid
- Using Stack instead of Deque