3 subtopics · 10 problems
Stacks, Queues & Deques
Monotonic stacks, monotonic deques, bracket matching, and expression parsing.
01Monotonic Stack
Next greater/smaller element in O(n).
1 easy2 medium1 hard
| Problem | Difficulty | Link |
|---|---|---|
| 1851BParity Sort | easy | Solve |
| 1862CFlower City Fence | medium | Solve |
| 1579E2Array Optimization by Deque (hard) | medium | Solve |
| 1837DBracket Coloring | hard | Solve |
02Monotonic Deque
Sliding window minimum/maximum in O(n).
2 medium1 hard
| Problem | Difficulty | Link |
|---|---|---|
| 602BApproximating a Constant Range | medium | Solve |
| 1279BVerse For Santa | medium | Solve |
| 372CWatching Fireworks is Fun | hard | Solve |
03Bracket Matching & Validation
Check balanced brackets, compute nesting depth.
2 medium1 hard
| Problem | Difficulty | Link |
|---|---|---|
| 1837DBracket Coloring | medium | Solve |
| 1515CPhoenix and Towers | medium | Solve |
| 380CSereja and Brackets | hard | Solve |
Was this helpful?