The map
Arrays · windows · search
Stack · heap · lists · trees
Graphs · intervals
BT · DP · bits · trie
- Arrays & hash maps
- Strings (palindrome · expand center · encode)
- Two pointers & sliding window
- Binary search · Stacks & heaps
- Linked lists · Trees & BST
- Graphs · Intervals & greedy
- Union-Find · Bit manipulation
- Backtracking · DP
- Prefix sums · tries · matrices
Use the ordered list below as a curriculum spine. Each link is a Lattice deep dive with templates and traces — work them top to bottom unless a company guide says otherwise.
What staff loops add
Why pattern-first beats random grinding
Random LeetCode streaks feel productive and still leave you blank when the interviewer renames the problem. Lattice prep is pattern-first: learn the move, then costume-change it across titles. This page is the 4–6 week plan that turns that idea into calendar blocks.
4–6 week plan (weekly goals)
Arrays · hash · windows
Search · stack · heap
Lists · trees · BST
Graphs · Union-Find · intervals
BT · DP · prefix/trie
Mocks · company polish
Week 1 — linear scans. Start with arrays & hash maps, then finish two pointers & sliding window. Goal: Two Sum / frequency map plus opposite-end pair sum and one variable window, each coded from memory with a dry-run table. Done: 6 problems (2 hash-map, 2 two-pointer, 2 window), each with complexity said aloud.
Week 2 — search & priority. Binary search (classic + search-on-answer) and stacks & heaps. Done: lower_bound template + one monotonic-stack + one top-K heap, each with an invariant sentence.
Week 3 — pointers & recursion. Linked lists and trees & BST. Done: reverse / cycle / merge list drills; tree DFS with an explicit return contract; one BST validate.
Week 4 — graphs & intervals. Graphs (BFS / topo) and intervals & greedy. Done: grid BFS shortest path, Kahn’s algorithm on a DAG, merge intervals, one greedy proof sketch.
Week 5 — search space & state. Backtracking, DP, and prefix / tries / matrices. Done: subsets + permutations templates; one 1D DP and one 2D DP stated as state→transition→base; one prefix-sum range query.
Week 6 (optional stretch) — timed mocks. Two full 45-minute mocks per week (plain editor, no autocomplete). After each: rewrite the talk track in 5 bullets. Revisit weak patterns from the hub pages search / stacks / heaps and backtracking / DP.
Mock cadence & what “done” looks like
- Daily (60–90 min): 1 template review (10 min) + 2 fresh mediums (timed) + write 3 edge cases you almost missed.
- Twice weekly: 45-min mock — restate, brute force verbally, implement, complexity, one follow-up verbally.
- Weekly review: list patterns you still rename slowly; re-drill those templates only.
One-problem session script
- 2 min — restate + constraints + empty / duplicates / overflow examples
- 3 min — brute force out loud, then name the pattern
- 15–20 min — implement; dry-run with a 4-row variable table before submit
- 5 min — complexity, edges, one alternative
- Stuck 8+ min — peek at pattern name only, not full code
Calendar the pattern, not the problem title. Every session ends with a spoken complexity line.
Pattern catalog — questions to master
Twenty patterns with two example questions each. Drill via the linked deep dive’s pattern bank (Python + Java solutions).
- Arrays & hash maps — Two Sum, Group Anagrams, Longest Consecutive → post
- Two pointers — 3Sum, Container With Most Water → post
- Sliding window — Longest substring no repeat, Min window substring → post
- Binary search — Rotated array, First/last position → post
- Search on answer — Koko bananas, Split array largest sum → post
- Monotonic stack — Daily temperatures, Largest rectangle → post
- Heaps — Top K frequent, Merge K lists → post
- Linked lists — Reverse, Cycle II, LRU → post
- Trees — LCA, Diameter, Serialize → post
- BST — Validate BST, LCA in BST → post
- BFS — Islands, Word Ladder → post
- Topo / cycle — Course Schedule → post
- Dijkstra — Network Delay Time → post
- 1D DP — Climb stairs, House robber → post
- Knapsack-style — Coin change, Edit distance → post
- Backtracking — Subsets, Permutations, N-Queens → post
- Intervals — Merge, Insert, Non-overlapping → post
- Greedy jumps — Jump Game II, Gas station → post
- Prefix + hash — Subarray sum = K → post
- Trie — Implement Trie, Word Search II → post
- Matrices / multi-BFS — Set zeroes, Rotting oranges → post
Backend depth — how this roadmap feeds system design
Backend loops still start with DSA fluency. Use this roadmap as the coding spine of the interview prep plan — pattern templates first, random grinding never.
Related Lattice posts: Arrays & hash maps · Two pointers & sliding window · Interview prep plan · Backend interview checklist