- Stack and Queue operations
- String problems using stacks
- Monotonic stacks
- Simplify Path
- Moving Average from Data Stream
- Next Greater Element I
-
What is the main principle of a stack?
- a) First In, First Out (FIFO)
- b) Last In, First Out (LIFO)
- c) Random Access
- d) Sorting
-
What is the time complexity of adding an element to a queue?
- a) O(n)
- b) O(log n)
- c) O(1)
- d) O(n^2)
-
Which problem can be efficiently solved using a monotonic stack?
- a) Sorting an array
- b) Finding the next greater element
- c) Calculating prefix sums
- d) Reversing a linked list