Data Structures & Algorithms
Arrays, trees, graphs, sorting, dynamic programming, and the patterns that crack coding interviews.
Complexity & Fundamentals
Big O Notation
Understanding time and space complexity to measure how efficient our code really is.
Recursion
Understanding how functions call themselves and why the call stack matters.
Bit Manipulation
Bitwise operators and clever tricks that show up in coding interviews.
Two Pointers
A versatile technique that uses two references to traverse data efficiently.
Sliding Window
Efficiently process subarrays and substrings by maintaining a moving window over the data.
Arrays, Strings & Hashing
Arrays & Operations
What arrays are, how they work in memory, and the essential operations every coder needs to know.
Strings & Pattern Matching
How strings work, immutability quirks, and the classic interview patterns: palindromes, anagrams, and frequency counting.
Hash Maps & Hash Sets
How hash tables work, when to use maps vs sets, and the classic patterns: two sum, frequency counting, and duplicate detection.
Prefix Sum & Difference Arrays
Precompute cumulative sums for instant range queries, and use difference arrays for efficient range updates.
Matrix Problems
2D arrays, common traversal patterns (spiral, diagonal), rotation, and searching in sorted matrices.
Sorting Algorithms
Merge sort, quick sort, and when each sorting algorithm shines.
Linked Lists, Stacks & Queues
Linked Lists
Singly and doubly linked lists, pointer manipulation, and classic interview patterns.
Stacks
LIFO data structure, the call stack, and classic stack interview problems.
Monotonic Stack
Using monotonically increasing or decreasing stacks for next greater/smaller element problems.
Queues and Deques
FIFO queues, double-ended queues, and their role in BFS and sliding window problems.
Priority Queues and Heaps
How heaps work, min-heap vs max-heap, and solving top-K and merge-K problems.
Data Structure Design Problems
Implementing LRU cache, min stack, and other design-your-own-DS interview classics.
Trees & Tries
Binary Trees
Tree terminology, traversals (inorder, preorder, postorder, level-order), and fundamental tree problems.
Binary Search Trees
BST property, search/insert/delete operations, validation, and common BST interview problems.
Binary Search
Classic binary search and variations -- rotated arrays, first/last occurrence, search space problems.
Tree Construction and Serialization
Building trees from traversals, serializing/deserializing trees, and codec design.
Lowest Common Ancestor
Finding LCA in binary trees and BSTs, plus problems that build on LCA.
Tries (Prefix Trees)
How tries work, implementation, autocomplete, and when to prefer a trie over a hash map.
Graphs
Graph Representations
Adjacency list vs adjacency matrix, directed vs undirected, and when to use each.
BFS and DFS
Breadth-first and depth-first traversal patterns for graphs and grids.
Topological Sort
Kahn's algorithm and DFS-based topological ordering for dependency problems.
Shortest Path Algorithms
Dijkstra's algorithm, Bellman-Ford, and BFS for unweighted graphs.
Union-Find (Disjoint Set)
Union by rank, path compression, and solving connected component problems efficiently.
Advanced Graph Problems
Cycle detection, bipartite checking, minimum spanning trees, and senior-level graph concepts.
Dynamic Programming
Dynamic Programming Fundamentals
What DP actually is, memoization vs tabulation, and how to identify DP problems.
1D DP Patterns
Climbing stairs, house robber, coin change, and other single-dimension DP classics.
2D DP Patterns
Grid paths, edit distance, longest common subsequence, and matrix-based DP.
Knapsack Patterns
0/1 knapsack, unbounded knapsack, subset sum, and partition problems.
Interval and String DP
Palindrome partitioning, longest palindromic subsequence, and interval-based DP patterns.
DP on Trees and Graphs
Tree diameter, house robber on trees, and combining DP with graph structures.
Greedy, Backtracking & Interview Patterns
Greedy Algorithms
The greedy approach, interval scheduling, jump game, and proving greedy correctness.
Backtracking
The backtracking template, permutations, combinations, subsets, and constraint satisfaction.
Interval Problems
Merge intervals, insert interval, meeting rooms, and the sweep line technique.
Binary Search on Answer
Applying binary search to the solution space for optimization problems.
Common Interview Patterns Cheatsheet
A quick-reference guide mapping problem types to patterns and techniques.