Advanced

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:

OutcomeWhat It MeansAction
Solved optimally on timeYou know this pattern wellReview in 7 days (maintenance)
Solved with brute forceYou recognize the problem but not the optimizationStudy the optimal approach, retry in 3 days
Solved but over timeYou know the approach but need speedPractice 3 similar problems with a strict timer
Could not solveYou do not know this patternStudy the pattern deeply, solve 5 related problems, retry in 2 days
Made a bug that cost timeImplementation weaknessWrite 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:

PatternExam ProblemsYour ScorePriority
Hash Map / SetTwo Sum, Contains Duplicate, Valid Anagram, Group Anagrams__/4
Sliding WindowLongest Substring, Minimum Window Substring__/2
Two PointersTrapping Rain Water__/1
Prefix/SuffixProduct of Array Except Self__/1
BFS/DFSLevel Order, Number of Islands__/2
Topological SortCourse Schedule__/1
Dynamic ProgrammingCoin Change, Word Break__/2
Sort + GreedyMerge Intervals__/1
Data Structure DesignLRU Cache__/1
ML ImplementationKNN, Feature Pipeline, Rate Limiter__/3
💡
Key Insight: Patterns where you scored below 50% are your highest priority. Spend 80% of your remaining study time on your weakest 2–3 patterns. This is far more effective than solving random problems.

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

DayActivityTime
MondayNew problems (weakest pattern): 3 problems90 min
TuesdayRe-solve Monday's problems + 1 new problem60 min
WednesdayMock exam (from this course or custom)60–75 min
ThursdayReview Wednesday's exam + re-solve missed problems60 min
FridayDay 5 re-solves + 2 new problems (second weakest pattern)90 min
SaturdayMock exam (different topic mix)60–75 min
SundayLight review: skim solutions, update tracking sheet30 min

Common Mistakes and How to Fix Them

MistakeRoot CauseFix
Off-by-one errorsNot tracing through small examplesAlways trace indices 0, 1, n-1, n with your code before submitting
Forgetting edge casesJumping to code too fastWrite edge cases as comments before coding: empty, single element, all same
Wrong data structure choiceNot analyzing time requirementsAsk: "What operation do I need in O(1)?" Then pick the structure.
Infinite loops in BFS/DFSNot marking visited nodesAlways add visited set or mark-in-place before adding to queue/stack
DP wrong recurrenceUnclear state definitionWrite "dp[i] represents..." in a comment before coding the recurrence
Timeout on large inputsHidden O(n^2) in O(n) loopCheck: 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

Congratulations on completing the Timed Coding Practice course! Here is your action plan:
  1. Review your scores across all 6 mock exams
  2. Identify your 2–3 weakest patterns from the tracking table above
  3. Spend the next 2 weeks doing focused practice on those patterns using spaced repetition
  4. Retake the mock exams you scored lowest on
  5. When you can score "Excellent" on all 6 exams, you are interview-ready