8-Week Interview Prep Roadmap
Structured study plan referencing specific files in coding-interview-patterns/. Spend ~1 hour/day, 5 days/week.
Week 1: Foundations (Arrays + Hashing)
| Day |
Pattern |
Files to Study |
| 1 |
Two Pointers |
cpp/Two Pointers/pair_sum_sorted.cpp, triplet_sum.cpp |
| 2 |
Two Pointers |
cpp/Two Pointers/largest_container.cpp, shift_zeros_to_the_end.cpp |
| 3 |
Hash Maps |
cpp/Hash Maps and Sets/pair_sum_unsorted.cpp, zero_striping.cpp |
| 4 |
Hash Maps |
cpp/Hash Maps and Sets/longest_chain_of_consecutive_numbers.cpp |
| 5 |
Review |
Re-solve Day 1–4 problems in Python or Go |
Week 2: Linked Lists + Sliding Windows
| Day |
Pattern |
Files to Study |
| 1 |
Linked Lists |
cpp/Linked Lists/linked_list_reversal.cpp, remove_kth_last_node.cpp |
| 2 |
Linked Lists |
cpp/Linked Lists/linked_list_intersection.cpp, palindromic_linked_list.cpp |
| 3 |
Sliding Windows |
cpp/Sliding Windows/longest_substring_with_unique_chars.cpp |
| 4 |
Sliding Windows |
cpp/Sliding Windows/longest_uniform_substring_after_replacements.cpp |
| 5 |
Fast & Slow |
cpp/Fast and Slow Pointers/ cycle detection problems |
Week 3: Binary Search + Stacks
| Day |
Pattern |
Files to Study |
| 1 |
Binary Search |
cpp/Binary Search/find_the_insertion_index.cpp |
| 2 |
Binary Search |
cpp/Binary Search/first_and_last_occurrences_of_a_number.cpp |
| 3 |
Binary Search |
cpp/Binary Search/find_the_target_in_a_rotated_sorted_array.cpp |
| 4 |
Stacks |
cpp/Stacks/valid_parenthesis_expression.cpp, evaluate_expression.cpp |
| 5 |
Stacks |
cpp/Stacks/next_largest_number_to_the_right.cpp |
Week 4: Trees + Heaps
| Day |
Pattern |
Files to Study |
| 1 |
Trees |
cpp/Trees/invert_binary_tree_recursive.cpp, binary_search_tree_validation.cpp |
| 2 |
Trees |
cpp/Trees/lowest_common_ancestor.cpp, rightmost_nodes_of_a_binary_tree.cpp |
| 3 |
Trees |
cpp/Trees/serialize_and_deserialize_a_binary_tree.cpp |
| 4 |
Heaps |
cpp/Heaps/k_most_frequent_strings_min_heap.cpp, sort_a_k_sorted_array.cpp |
| 5 |
Heaps |
cpp/Heaps/median_of_an_integer_stream.cpp |
Week 5: Graphs
| Day |
Pattern |
Files to Study |
| 1 |
Graphs (DFS) |
cpp/Graphs/count_islands.cpp, longest_increasing_path.cpp |
| 2 |
Graphs (BFS) |
cpp/Graphs/shortest_path.cpp, matrix_infection.cpp |
| 3 |
Graphs (Topo) |
cpp/Graphs/prerequisites.cpp |
| 4 |
Graphs |
cpp/Graphs/shortest_transformation_sequence.cpp |
| 5 |
Tries |
cpp/Tries/ all problems |
Week 6: Dynamic Programming
| Day |
Pattern |
Files to Study |
| 1 |
DP (1D) |
cpp/Dynamic Programming/climbing_stairs_bottom_up.cpp |
| 2 |
DP (1D) |
cpp/Dynamic Programming/neighborhood_burglary.cpp, min_coin_combination_bottom_up.cpp |
| 3 |
DP (2D) |
cpp/Dynamic Programming/longest_common_subsequence.cpp |
| 4 |
DP (2D) |
cpp/Dynamic Programming/knapsack.cpp, matrix_pathways.cpp |
| 5 |
DP |
cpp/Dynamic Programming/longest_palindrome_in_a_string.cpp |
Week 7: Backtracking + Greedy + Intervals
| Day |
Pattern |
Files to Study |
| 1 |
Backtracking |
cpp/Backtracking/find_all_subsets.cpp, combinations_of_sum_k.cpp |
| 2 |
Backtracking |
cpp/Backtracking/find_all_permutations.cpp, n_queens.cpp |
| 3 |
Greedy |
cpp/Greedy/jump_to_the_end.cpp, gas_stations.cpp |
| 4 |
Intervals |
cpp/Intervals/merge_overlapping_intervals.cpp |
| 5 |
Prefix Sums |
cpp/Prefix Sums/ all problems |
Week 8: Mixed Practice + Weak Areas
| Day |
Pattern |
Files to Study |
| 1 |
Bit Manipulation |
cpp/Bit Manipulation/ all problems |
| 2 |
Math & Geometry |
cpp/Math and Geometry/ all problems |
| 3 |
Sort & Search |
cpp/Sort and Search/ all problems |
| 4 |
Weak areas |
Revisit patterns you struggled with |
| 5 |
Mock interview |
Pick 2 random problems, solve under time pressure |
Tips
- After solving in C++, port to Go using
coding-interview-patterns/go/ as reference
- Time yourself: Easy (15 min), Medium (25 min), Hard (40 min)
- Write the approach in comments before coding
- If stuck for >10 minutes, read the solution then re-solve from scratch next day