Appendix L: 30-Day Crash Course
An intensive crash course focusing on the highest-impact topics only. For those with very limited time.
Overview
- Duration: 4 weeks (28 days + 2 rest days)
- Daily commitment: 5-6 hours
- Weekly pattern: 6 days learning + 1 day review
- Total problems: ~120-150
- Goal: Cover the most frequently asked topics at a functional level
Who This Plan Is For
- You have an interview in 3-4 weeks
- You have some programming background
- You can dedicate 5-6 hours daily
- You need to prioritize the highest-impact topics
Warning: This plan is intense. You won’t master every topic, but you’ll be functional in the most important ones.
Priority Topics (Highest Interview Frequency)
- Arrays & Strings — 20% of interview questions
- Trees & BST — 15% of interview questions
- Dynamic Programming — 15% of interview questions
- Graphs — 12% of interview questions
- Hash Tables — 10% of interview questions
- Sorting & Searching — 10% of interview questions
- Stacks & Queues — 8% of interview questions
- Linked Lists — 5% of interview questions
- Trie & Advanced — 5% of interview questions
Week 1: Core Fundamentals (Days 1-7)
Day 1: Arrays & Hash Maps
- Two Sum (hash map approach)
- Contains Duplicate
- Best Time to Buy/Sell Stock
- Group Anagrams
- Practice: 4-5 problems
Day 2: Strings & Two Pointers
- Valid Anagram
- Longest Substring Without Repeating Characters
- Container With Most Water
- 3Sum
- Practice: 4-5 problems
Day 3: Sliding Window & Prefix Sums
- Maximum Subarray (Kadane’s)
- Minimum Window Substring
- Product of Array Except Self
- Subarray Sum Equals K
- Practice: 4-5 problems
Day 4: Linked Lists
- Reverse Linked List
- Merge Two Sorted Lists
- Linked List Cycle (Floyd’s)
- Remove Nth Node From End
- Practice: 4-5 problems
Day 5: Stacks & Queues
- Valid Parentheses
- Min Stack
- Daily Temperatures
- Implement Queue using Stacks
- Practice: 4-5 problems
Day 6: Heaps
- Kth Largest Element
- Top K Frequent Elements
- Find Median from Data Stream
- Merge K Sorted Lists
- Practice: 4-5 problems
Day 7: Review Day
- Review all concepts from week 1
- Redo any problems you couldn’t solve
- Update cheat sheets
Week 2: Trees & Graphs (Days 8-14)
Day 8: Binary Tree Basics
- Inorder/Preorder/Postorder traversals
- Maximum Depth of Binary Tree
- Level Order Traversal
- Same Tree / Symmetric Tree
- Practice: 4-5 problems
Day 9: BST & LCA
- Validate BST
- Kth Smallest Element in BST
- Lowest Common Ancestor
- Insert/Delete in BST
- Practice: 4-5 problems
Day 10: Tree Construction & Serialization
- Construct from Preorder/Inorder
- Serialize/Deserialize Binary Tree
- Binary Tree Maximum Path Sum
- Practice: 3-4 problems
Day 11: Graph Basics & BFS
- Number of Islands
- Rotting Oranges
- Clone Graph
- Word Ladder
- Practice: 4-5 problems
Day 12: Graph DFS & Topological Sort
- Course Schedule
- Course Schedule II
- Number of Connected Components
- Graph Valid Tree
- Practice: 4-5 problems
Day 13: Shortest Path & Union-Find
- Dijkstra (Network Delay Time)
- Union-Find (Redundant Connection)
- Cheapest Flights Within K Stops
- Practice: 3-4 problems
Day 14: Review Day
- Review trees and graphs
- Redo challenging problems
- Update cheat sheets
Week 3: Dynamic Programming (Days 15-21)
Day 15: REST DAY
Day 16: 1D DP
- Climbing Stairs
- House Robber
- Maximum Product Subarray
- Decode Ways
- Practice: 4-5 problems
Day 17: Knapsack & Subset
- Coin Change
- Partition Equal Subset Sum
- Target Sum
- Unbounded Knapsack pattern
- Practice: 4-5 problems
Day 18: String DP
- Longest Common Subsequence
- Edit Distance
- Longest Palindromic Substring
- Word Break
- Practice: 4-5 problems
Day 19: Grid DP
- Unique Paths
- Minimum Path Sum
- Dungeon Game
- Maximal Square
- Practice: 4-5 problems
Day 20: LIS & Interval DP
- Longest Increasing Subsequence
- Russian Doll Envelopes
- Burst Balloons
- Practice: 3-4 problems
Day 21: Review Day
- Review all DP patterns
- Redo challenging problems
- Update cheat sheets
Week 4: Binary Search, Sorting, & Final Prep (Days 22-28)
Day 22: Binary Search
- Binary Search (standard)
- Search in Rotated Sorted Array
- Find Minimum in Rotated Sorted Array
- Binary Search on Answer (Koko Eating Bananas)
- Practice: 4-5 problems
Day 23: Sorting & Quickselect
- Merge Sort
- Kth Largest Element (Quickselect)
- Merge Intervals
- Largest Number
- Practice: 4-5 problems
Day 24: Backtracking
- Subsets
- Permutations
- Combination Sum
- N-Queens
- Practice: 4-5 problems
Day 25: Trie & String Matching
- Implement Trie
- Word Search II
- KMP Algorithm (basic understanding)
- Practice: 3-4 problems
Day 26: REST DAY
Day 27: Mock Interview & Review
- Full mock interview (45-60 minutes)
- Review weak areas
- Redo 3-4 challenging problems
Day 28: Final Review
- Review all cheat sheets
- Practice problem identification
- Prepare for interviews
Daily Schedule
| Time | Activity |
|---|---|
| 0:00-0:15 | Review yesterday’s material |
| 0:15-1:30 | Learn new concept (videos, reading, examples) |
| 1:30-3:30 | Solve problems (4-5 problems) |
| 3:30-3:45 | Break |
| 3:45-5:00 | Solve additional problems or review |
| 5:00-5:30 | Update notes and cheat sheets |
| 5:30-6:00 | Review patterns and approaches |
Problem Count by Topic
| Topic | Problems | Key Patterns |
|---|---|---|
| Arrays & Strings | 20-25 | Two pointers, sliding window, hash map |
| Linked Lists | 10-12 | Fast/slow pointers, reversal |
| Stacks & Queues | 10-12 | Monotonic stack, parentheses |
| Heaps | 8-10 | Top K, median, merge |
| Trees & BST | 15-18 | Traversals, BST, LCA |
| Graphs | 15-18 | BFS, DFS, topo sort, DSU |
| Dynamic Programming | 20-25 | 1D, 2D, knapsack, string |
| Binary Search | 10-12 | Standard, rotated, on answer |
| Sorting | 8-10 | Merge sort, quickselect, intervals |
| Backtracking | 8-10 | Subsets, permutations, combinations |
| Trie | 4-5 | Prefix queries |
| Total | ~120-150 |
Essential Patterns to Master
1. Two Pointers
When: Sorted arrays, pair finding
Pattern: Start at both ends, move based on condition
2. Sliding Window
When: Contiguous subarray/substring
Pattern: Expand right, shrink left when needed
3. Hash Map
When: Frequency counting, lookup
Pattern: Store as you iterate, check as you go
4. BFS
When: Shortest path, level-order
Pattern: Queue, visited array, process level by level
5. DFS
When: Path finding, tree traversal
Pattern: Recursion or stack, mark visited
6. Binary Search
When: Sorted array, monotonic function
Pattern: lo/hi pointers, eliminate half each step
7. DP
When: Overlapping subproblems, optimal substructure
Pattern: Define state, find recurrence, fill table
8. Backtracking
When: Generate all solutions
Pattern: Choose, explore, undo
Cheat Sheet: When to Use What
| Problem Type | Technique | Time Complexity |
|---|---|---|
| Find pair with sum | Hash map | O(n) |
| Sorted array, find pair | Two pointers | O(n) |
| Contiguous subarray | Sliding window | O(n) |
| Shortest path (unweighted) | BFS | O(V+E) |
| All paths / permutations | DFS / Backtracking | Varies |
| Sorted array search | Binary search | O(log n) |
| Overlapping subproblems | DP | Varies |
| Top K elements | Heap | O(n log k) |
| Frequency counting | Hash map | O(n) |
| Parentheses matching | Stack | O(n) |
| Tree traversal | DFS / BFS | O(n) |
| Connected components | DFS / DSU | O(V+E) |
Last-Minute Tips
- Don’t try to learn everything — focus on the patterns listed above
- Practice explaining — being able to explain your approach is half the battle
- Test with examples — always trace through your code with the given examples
- Handle edge cases — empty input, single element, all same elements
- State complexity — always know the time and space complexity of your solution
- Stay calm — if you get stuck, take a breath and think about simpler versions of the problem
Problem List (Must-Do)
Arrays & Strings (Top 10)
- Two Sum
- Best Time to Buy/Sell Stock
- Maximum Subarray
- Product of Array Except Self
- Contains Duplicate
- Longest Substring Without Repeating Characters
- 3Sum
- Container With Most Water
- Group Anagrams
- Minimum Window Substring
Trees (Top 8)
- Maximum Depth
- Level Order Traversal
- Validate BST
- Lowest Common Ancestor
- Construct from Preorder/Inorder
- Binary Tree Maximum Path Sum
- Serialize/Deserialize
- Kth Smallest in BST
Graphs (Top 6)
- Number of Islands
- Course Schedule
- Clone Graph
- Number of Connected Components
- Word Ladder
- Network Delay Time
DP (Top 10)
- Climbing Stairs
- Coin Change
- Longest Common Subsequence
- Edit Distance
- Unique Paths
- House Robber
- Word Break
- Longest Increasing Subsequence
- Partition Equal Subset Sum
- Maximum Product Subarray
Other (Top 6)
- Valid Parentheses
- Merge Two Sorted Lists
- Reverse Linked List
- Kth Largest Element
- Implement Trie
- Subsets
Total: ~40 must-do problems + additional practice = ~120-150 problems
This crash course covers the highest-impact topics. You won’t master everything, but you’ll be functional in the most important areas. Good luck!
Frequently Asked Questions
Is 30 days really enough?
It depends on your starting point. If you already have a computer science degree and have done some programming, 30 days of focused preparation can get you interview-ready for most companies. If you’re starting from zero, you’ll need more time. Be honest with yourself about where you stand.
The goal of this crash course isn’t mastery — it’s functionality. You’ll be able to recognize and solve the most common interview problems. You won’t be ready for the hardest problems at top-tier companies, but you’ll be competitive for most roles.
What if I can’t solve a problem after 30 minutes?
Look at the solution, but don’t just copy it. Read the approach, close the solution, and try to implement it yourself. Then compare your implementation with the reference. Finally, add the problem to your review list and redo it in 3-4 days.
How do I handle problems I’ve never seen before?
This is the whole point of learning patterns. When you see a new problem, don’t think about the specific problem — think about which pattern it matches. Is it a sliding window problem? A graph BFS? A DP problem? Once you identify the pattern, the template gives you the skeleton of the solution.
Should I skip easy problems?
No. Easy problems build speed and confidence. They also often contain the same patterns as medium problems, just with simpler implementation. If you can solve an easy problem in 5 minutes, you have more time for the hard ones.
What about system design interviews?
This crash course focuses on coding interviews only. System design is a separate skill that requires different preparation. If you have system design interviews, dedicate the last week to it instead of coding practice.
Time-Saving Tips
Learn to Recognize Patterns Instantly
The fastest way to solve interview problems is pattern recognition. Instead of thinking about each problem from scratch, train yourself to see the pattern:
- “Need to find a pair with a target sum?” → Hash map
- “Sorted array with a condition?” → Binary search or two pointers
- “Contiguous subarray with a property?” → Sliding window or prefix sum
- “Shortest path in an unweighted graph?” → BFS
- “All possible combinations?” → Backtracking
- “Optimal solution with overlapping subproblems?” → DP
Use Templates
Don’t reinvent the wheel for common patterns. Have a template for:
- Binary search (with both left and right boundary variants)
- BFS and DFS (graph and tree)
- Sliding window (fixed and variable size)
- DP (1D and 2D)
- Backtracking (with pruning)
Optimize Your Coding Speed
In a 45-minute interview, you have about 20 minutes for coding. Practice typing your templates without looking at the keyboard. Know your language’s standard library well — especially vector, unordered_map, priority_queue, and sort.
Common Failure Modes and How to Avoid Them
Failure Mode 1: Panic
You see a problem and your mind goes blank. Solution: Take a deep breath and start with what you know. Restate the problem. Draw an example. Think about the brute force. The act of doing something breaks the panic cycle.
Failure Mode 2: Tunnel Vision
You get fixated on one approach that isn’t working and refuse to consider alternatives. Solution: Set a mental timer. If you haven’t made progress in 5 minutes, explicitly state: “This approach isn’t working because X. Let me try Y instead.”
Failure Mode 3: Off-by-One Errors
Your logic is correct but your indices are wrong. Solution: Always trace through your code with a small example (3-5 elements) before declaring you’re done. Pay special attention to loop boundaries, empty inputs, and single elements.
Failure Mode 4: Forgetting Edge Cases
You solve the general case but miss empty inputs, negative numbers, or overflow. Solution: Before coding, list 3 edge cases. After coding, verify each one.
Failure Mode 5: Poor Communication
You solve the problem but the interviewer has no idea how you got there. Solution: Practice the think-aloud protocol. Narrate your thought process as if you’re explaining to a friend.
What to Do After the 30 Days
If Your Interviews Went Well
- Continue practicing to maintain your skills
- Start learning system design if needed
- Explore advanced topics (segment trees, network flow, etc.)
If Your Interviews Didn’t Go Well
- Analyze what went wrong (specific topics? communication? time management?)
- Extend your preparation with the 60-day or 90-day plan
- Focus on your weakest areas with targeted practice
- Do more mock interviews to build confidence
Regardless of Outcome
- Keep a problem journal documenting patterns and insights
- Stay connected with the DSA community (LeetCode discuss, Reddit)
- Consider contributing to open source to maintain coding skills
- Remember: every interview is practice for the next one