Algorithms
Actual coverage
Algorithms; Big-O time/space; RAM/arrays; hash tables; two pointers; sliding windows; stacks/queues; linked lists; binary search; recursion; sorting; heaps/priority queues; trees; binary-search trees; tries; backtracking; graphs; BFS/DFS; advanced graph algorithms; greedy methods; intervals; one- and two-dimensional dynamic programming; bit manipulation.
Problem-solving map
- Two pointers: related positions moving through ordered/structured input.
- Sliding window: contiguous ranges with incrementally maintainable state.
- Stack/queue: nesting/history versus arrival order/frontiers.
- Binary search: monotonic search space, not only arrays.
- Heap: repeated access to the current minimum/maximum without fully sorting.
- Tree/trie: hierarchy, ordered lookup, and prefix structure.
- BFS: shortest paths in unweighted graphs and level order.
- DFS/backtracking: exhaustive structure with reversible choices and pruning.
- Greedy: locally optimal irreversible choices; requires a correctness argument.
- Dynamic programming: overlapping subproblems plus a state/transition definition.
Solving discipline
- Define input, output, constraints, and examples.
- Write the brute-force solution and complexity.
- Identify repeated work, monotonicity, ordering, or the needed access pattern.
- Choose the structure/pattern and state its invariant.
- Prove termination and correctness informally.
- Test empty, minimal, duplicate, ordered, reverse, and maximum cases.