Arrays and strings
How a coding round is scored, then the four patterns behind most array and string questions: hashing, two pointers, sliding window and prefix sums.
Lessons
- 01How a coding round is scoredThe six moves that turn a correct idea into a hire signal: clarify, example, brute force, improve, code, test.
- 02Hash maps and countingTrade memory for time: remember what you have seen so the inner loop becomes a lookup.
- 03Two pointersTwo indices that move toward each other (or together) so each step safely discards part of the search.
- 04Sliding windowGrow the right edge, shrink the left edge only when the window breaks its rule, and track the best window seen.
- 05Prefix sumsPrecompute running totals so any range sum is one subtraction, and pair them with a hash map to count ranges.