Topics
DSA topics, organized by pattern.
Every interview problem fits a recognizable pattern. Browse by topic to drill the patterns you're weakest on, or to refresh on the canonical examples for each category. Every problem ships with intuition, complexity analysis, and verified code in C++, Java, Python, and Go.
Array and hashing problems — the bedrock of coding interviews. Master indexing, prefix sums, and hash-map tricks.
Two-pointer problems — palindromes, sorted-array pair sums, and in-place partitioning in O(n) time and O(1) space.
Sliding-window problems — find the longest, shortest, or best contiguous subrange that satisfies a constraint.
Stack problems — parentheses matching, monotonic stacks, expression evaluation, and next-greater-element.
Binary-search problems — search a sorted array in O(log n), or apply parametric search on the answer space.
Linked-list problems — reversal, cycle detection, merge, reorder, and the runner / fast-slow pointer technique.
Tree problems — DFS and BFS traversal, BST validation, path sums, and tree construction from traversals.
Trie problems — prefix-tree implementations for word lookup, autocomplete, and prefix-based search.
Heap and priority-queue problems — top-K elements, median maintenance, and event scheduling.
Backtracking problems — combinations, permutations, subsets, word search, and constraint-satisfaction puzzles.
Graph problems — DFS, BFS, topological sort, union-find, and shortest-path traversal on grids and adjacency lists.
Dynamic programming — memoize overlapping subproblems for problems that look exponential but are polynomial.
Greedy problems — locally optimal choices that produce a globally optimal answer when the structure allows it.
Interval problems — merge, schedule, detect overlap, and the meeting-rooms / non-overlapping family.
Math problems — number theory, modular arithmetic, geometry, and pure-math reasoning at the algorithmic boundary.
Bit-manipulation problems — XOR tricks, masks, popcount, and integer encoding without arithmetic.