Review & Improvement
Completing mock exams is only half the work. The real improvement comes from systematic review: analyzing what went wrong, identifying patterns in your mistakes, and using spaced repetition to lock in the concepts that are weakest.
The Post-Exam Review Process
After every mock exam, spend 20–30 minutes on a structured review. This review time is more valuable than the exam itself.
Step 1: Categorize Each Problem
For every problem in the exam, record which category it falls into:
| Outcome | What It Means | Action |
|---|---|---|
| Solved optimally on time | You know this pattern well | Review in 7 days (maintenance) |
| Solved with brute force | You recognize the problem but not the optimization | Study the optimal approach, retry in 3 days |
| Solved but over time | You know the approach but need speed | Practice 3 similar problems with a strict timer |
| Could not solve | You do not know this pattern | Study the pattern deeply, solve 5 related problems, retry in 2 days |
| Made a bug that cost time | Implementation weakness | Write down the bug type. Practice careful tracing. |
Step 2: Identify Your Weak Patterns
After completing all 6 mock exams, tally your results by algorithm pattern:
| Pattern | Exam Problems | Your Score | Priority |
|---|---|---|---|
| Hash Map / Set | Two Sum, Contains Duplicate, Valid Anagram, Group Anagrams | __/4 | |
| Sliding Window | Longest Substring, Minimum Window Substring | __/2 | |
| Two Pointers | Trapping Rain Water | __/1 | |
| Prefix/Suffix | Product of Array Except Self | __/1 | |
| BFS/DFS | Level Order, Number of Islands | __/2 | |
| Topological Sort | Course Schedule | __/1 | |
| Dynamic Programming | Coin Change, Word Break | __/2 | |
| Sort + Greedy | Merge Intervals | __/1 | |
| Data Structure Design | LRU Cache | __/1 | |
| ML Implementation | KNN, Feature Pipeline, Rate Limiter | __/3 |
The Spaced Repetition System
Spaced repetition is the most scientifically backed method for long-term retention. Here is how to apply it to coding problems:
Day 1: Solve
Solve the problem for the first time. If you fail, study the solution thoroughly. Understand every line.
Day 2: Re-solve
Solve the same problem again from scratch without looking at the solution. This cements the approach.
Day 5: Test
Solve it again. If you can do it in under 20 minutes, you are retaining it. If not, reset to Day 1.
Day 14: Verify
Final re-solve. If you nail it, the pattern is locked in. Move it to maintenance (monthly review).
Sample Weekly Schedule
| Day | Activity | Time |
|---|---|---|
| Monday | New problems (weakest pattern): 3 problems | 90 min |
| Tuesday | Re-solve Monday's problems + 1 new problem | 60 min |
| Wednesday | Mock exam (from this course or custom) | 60–75 min |
| Thursday | Review Wednesday's exam + re-solve missed problems | 60 min |
| Friday | Day 5 re-solves + 2 new problems (second weakest pattern) | 90 min |
| Saturday | Mock exam (different topic mix) | 60–75 min |
| Sunday | Light review: skim solutions, update tracking sheet | 30 min |
Common Mistakes and How to Fix Them
| Mistake | Root Cause | Fix |
|---|---|---|
| Off-by-one errors | Not tracing through small examples | Always trace indices 0, 1, n-1, n with your code before submitting |
| Forgetting edge cases | Jumping to code too fast | Write edge cases as comments before coding: empty, single element, all same |
| Wrong data structure choice | Not analyzing time requirements | Ask: "What operation do I need in O(1)?" Then pick the structure. |
| Infinite loops in BFS/DFS | Not marking visited nodes | Always add visited set or mark-in-place before adding to queue/stack |
| DP wrong recurrence | Unclear state definition | Write "dp[i] represents..." in a comment before coding the recurrence |
| Timeout on large inputs | Hidden O(n^2) in O(n) loop | Check: string slicing, list.insert(0), sorting inside a loop |
Performance Tracking Template
Keep a spreadsheet or notebook to track every problem you attempt. Here are the columns to track:
| Date | Problem | Pattern | Time | Optimal? | Bugs? | Re-solve Date |
|------|---------|---------|------|----------|-------|---------------|
| 3/21 | Two Sum | Hash Map | 8 min | Yes | No | 3/23 |
| 3/21 | Trapping Rain Water | Two Ptr | 35 min | No (prefix) | OBO | 3/23, 3/26 |
| 3/22 | Course Schedule | Topo Sort | 28 min | Yes | Cycle detect | 3/24 |
Track these metrics over time:
- Average solve time per difficulty (Easy/Medium/Hard)
- Solve rate by pattern (which patterns are you weakest at?)
- Bug frequency (are off-by-one errors your most common bug?)
- Re-solve success rate (are you retaining patterns?)
Frequently Asked Questions
Quality matters more than quantity. Solving 150–200 well-chosen problems with thorough review is more effective than grinding 500 problems without understanding patterns. Focus on covering all major patterns (hash map, two pointers, sliding window, BFS/DFS, binary search, DP, backtracking, heap, sort/greedy) with 10–15 problems each. If you can solve a new Medium problem in 20 minutes consistently, you are ready.
No. Memorize patterns, not solutions. If you memorize "Two Sum uses a hash map," you can solve any variation (Three Sum, Four Sum, subarray sum). If you memorize the exact Two Sum code, you will fail when the problem is slightly different. Focus on understanding why a pattern works, not what the code looks like. The code should flow naturally from understanding the pattern.
Hard problems usually combine 2–3 patterns. The time sink is typically in identifying the right approach, not coding it. Practice: (1) Read the problem and write down 3 possible approaches in 2 minutes. (2) For each approach, estimate the time complexity. (3) Pick the one that meets constraints. Also, make sure you can code Medium problems in 15 minutes or less — that gives you 30+ minutes for the Hard problem.
Use these techniques: (1) Rubber duck debugging: explain your approach out loud as if teaching someone. This reveals gaps in your understanding. (2) Record yourself: use screen recording while solving problems. Review the recording to see where you waste time. (3) Use platforms: Pramp, Interviewing.io, and LeetCode contests simulate real interview pressure. (4) Write solutions from scratch: after studying a solution, close it and rewrite from memory.
This is completely normal and expected. The forgetting curve is steep: you will forget 80% of what you learn within a week without review. That is why spaced repetition is essential. When you forget a pattern: (1) Do not panic — re-learning is faster than initial learning. (2) Re-read the pattern explanation (not just the code). (3) Solve one problem using that pattern from scratch. (4) Schedule another re-solve in 2 days. After 3–4 re-solves over 2 weeks, the pattern will stick permanently.
Use whatever language you are most fluent in. Python is popular because of its concise syntax and built-in data structures (Counter, defaultdict, heapq, deque). Java and C++ work well too but require more boilerplate. The key is being able to translate your approach into code quickly without fighting the language. Do not switch languages just for interviews — the overhead of unfamiliarity will slow you down more than any language advantage.
In a real interview, yes — mention the brute force approach and its complexity, even if you do not code it. This shows you understand the problem and can analyze trade-offs. In a timed exam, code the brute force only if: (1) you cannot think of the optimal approach after 5 minutes, or (2) you need a working solution for partial credit. If you immediately see the optimal approach, go straight for it and mention "the brute force would be O(n^2) but we can do O(n) with a hash map."
Your Next Steps
- Review your scores across all 6 mock exams
- Identify your 2–3 weakest patterns from the tracking table above
- Spend the next 2 weeks doing focused practice on those patterns using spaced repetition
- Retake the mock exams you scored lowest on
- When you can score "Excellent" on all 6 exams, you are interview-ready
Lilly Tech Systems