Problem-Solving Techniques
Reusable ways to attack a problem: two pointers, sliding windows, backtracking, greedy choices and divide and conquer.
Array and pointer patterns
Pointer, window, prefix and stack patterns that turn quadratic scans into linear ones.
- Hash maps for lookup and counting A hash map remembers what you have already seen, so a single scan can find duplicates, pairs and running counts.