Arrays
Pointers, windows and in-place tricks, drawn out step by step.
Arrays progress0 / 8
- Array BasicsOne block of memory, instant access to any slot.4m
- Two PointersTwo indexes closing in beat one loop nesting another.5m
- Sliding WindowReuse the last answer instead of recomputing it.5m
- Prefix SumsPay once up front, answer range queries instantly.5m
- In-Place ReversalFlip an array with one temp variable, not a copy.4m
- Move ZeroesPush the junk to the back without losing the order.5m
- Container With Most WaterThe shorter wall decides. So move the shorter wall.6m
- Kadane's AlgorithmDrop the past the moment it starts costing you.6m