Arrays and Two Pointers • Advanced • 28 min
Trapping Rain Water
How to notice that water at each position depends on both side maximums and compress that into [two pointers](/glossary/two-pointers).
Practice problems with walkthroughs, hints, and solutions.
Filter by type or level
Arrays and Two Pointers • Advanced • 28 min
How to notice that water at each position depends on both side maximums and compress that into [two pointers](/glossary/two-pointers).
Sliding Window • Advanced • 30 min
How to turn "does it contain everything?" into a satisfaction condition and shrink the window only while it stays valid.
Trees • Advanced • 30 min
How to turn a tree into a string and back while preserving the null markers that define its shape.
Heap • Advanced • 25 min
How to keep the median ready by splitting the lower half and upper half with two [heap](/glossary/heap) structures.
Graphs • Advanced • 30 min
How to extract letter constraints from sorted words and turn them into a [topological sort](/glossary/topological-sort).