Advanced patterns
Monotonic stack
Used for nearest greater/smaller and histogram problems.
Trie
Used for dictionary and prefix matching.
Union-Find
Used for connectivity and grouping.
Segment tree
Used for range queries and updates.
Fenwick tree
Used for prefix sums and updates in O(log n).
Can you explain it without the notes?
Advanced patterns
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
Monotonic stack
Turn this concept into a clear answer.
Practice this conceptAdapted from 14_DSA_MASTER.md · “16. Advanced patterns”. Examples are study fragments; framework behavior can depend on your version.