Python Course · Three-week study plan
21-Day Python Coding Interview Practice Plan
Follow a three-week Python interview practice schedule with code tasks, checkpoints, reflection and a scoring rubric.
Learn the pattern, trace runnable code, and test an edge case.
Core idea
Alternate solution attempts with tests, explanations and review.
Week 2: patterns
Week 3: transfer
The direct answer
Practise Python every day with a clear result and a review.
This 21-day Python coding interview plan moves from language and data structures to algorithm patterns, debugging, advanced reasoning and a role task. It alternates timed problems with explanation and reflection. The point is not a streak; it is a growing record of correct contracts, tests and transferable reasoning.
The schedule uses original problems in this cluster and Python 3.10+ examples tested with 3.12.14. Adjust the pace if a concept does not stick. The synced course pricing block follows this overview; the daily plan remains usable as an independent worksheet.
Course access
Choose your next step in Python.
Review the current course options and access details here.
Heycademy Courses · Coming Soon
Master Python with Heycademy
We’re preparing an interactive learning experience with practical exercises, skill assessments and personalized learning to help you build confidence and master new skills.
We’re putting the finishing touches on this course. Please check back for updates.
Daily session
Finish with evidence, not only an answer.
| Minutes | Action | Output |
|---|---|---|
| 0–5 | Read prompt; state contract and assumptions. | Input/output/edge policy. |
| 5–20 | Write a correct baseline or trace. | Runnable function. |
| 20–30 | Test normal and edge cases. | Expected/actual record. |
| 30–40 | Explain complexity and change one condition. | Invariant, tradeoff, next gap. |
If only 20 minutes are available, reduce the number of problems but keep one test and one explanation. If a timed attempt fails, continue untimed until the cause is understood. A stopwatch should expose a bottleneck, not cut off the learning step that repairs it.
Days 1–7
Secure language and collection basics.
| Day | Focus | Task | Evidence |
|---|---|---|---|
| 1 | Baseline | Complete self-scored check; record two gaps. | Gap log. |
| 2 | Syntax + contracts | Write three functions with explicit empty behavior. | Three tests. |
| 3 | Lists + strings | Trace indexing, slicing and mutation. | Boundary fixture. |
| 4 | Sets + dictionaries | Compare membership and counting. | Complexity note. |
| 5 | Two-sum | Write brute force then map version. | Invariant + duplicate test. |
| 6 | Testing | Add normal, empty and adversarial cases. | Regression suite. |
| 7 | Checkpoint | Explain one solution aloud, untimed. | Record unclear step. |
By day 7, you should be able to explain when a list scan is reasonable and when a set or dictionary changes the work. The two-sum task tests whether you can derive an optimized solution from repeated work. Use the baseline check to pick an extra day for your weakest foundation.
Days 8–14
Learn patterns and debug their boundaries.
| Day | Focus | Task | Evidence |
|---|---|---|---|
| 8 | Two pointers | Solve exact palindrome and merge sorted lists. | Index trace. |
| 9 | Sliding window | Solve longest unique substring. | Trace abba. |
| 10 | Counters | Anagrams and frequency ties. | Tie policy. |
| 11 | Binary search | Inclusive and lower-bound contracts. | Last-index test. |
| 12 | Debugging | Aliasing, defaults and iterator state. | Five failure fixtures. |
| 13 | Timed set | Two new problems under chosen time limit. | Error classification. |
| 14 | Checkpoint | Redo weakest family without notes. | Fresh-case pass. |
Do not memorize “sliding window” as a slogan. On day 9, write the current window and the last-seen indices for abba. On day 11, test binary search against a final-index target and a singleton list. On day 12, reproduce five small Python failures before studying fixes. Day 14 should use a new input so it measures transfer.
Keep building this skill
Turn the example into a tested solution.
Return to the course options whenever you are ready.
Days 15–21
Move to constrained and role-shaped tasks.
| Day | Focus | Task | Evidence |
|---|---|---|---|
| 15 | Intervals | Merge touching intervals. | Boundary convention. |
| 16 | Graphs | BFS distance and unreachable nodes. | Queue invariant. |
| 17 | Recursion | Define subset-sum state and base cases. | State trace. |
| 18 | Optimization | Compare recursion and reachable totals. | Time/space note. |
| 19 | Role task | Choose data, backend or automation case. | Applied test. |
| 20 | Mock explanation | Clarify, code, test and explain one new task. | Communication rubric. |
| 21 | Review | Revisit gaps and plan further practice. | Next-week task list. |
The advanced week is selective. A candidate for a data role can spend extra time on validation and grouping; a backend candidate can add API-shaped contracts; an automation candidate can add failure/retry behavior. Keep the core algorithm checks. On day 20, narrate one new solution from clarification to tests and complexity.
A five-part review rubric
Score the process, then repair the lowest part.
| Dimension | 0 | 1 | 2 |
|---|---|---|---|
| Contract | Unstated. | Partial. | Inputs, output and edge policy clear. |
| Correctness | Fails sample. | Passes sample only. | Passes normal and changed case. |
| Testing | None. | One test. | Boundary and adversarial tests. |
| Complexity | Missing/incorrect. | Time only. | Time and space with assumptions. |
| Explanation | Pattern label only. | Some reasoning. | Invariant, rejected alternative and limit. |
A score of 10 is not a job-readiness certificate. It is a local learning tool. A solution can be correct yet earn a low explanation score; spend the next session practicing the invariant aloud. A fast answer with no edge tests deserves test work rather than another speed drill.
Two-session example
Timed attempt followed by reflection.
On day 13, Lea spends 18 minutes on longest unique substring and writes a window that incorrectly moves left backward on the last a in abba. She records the failing input and stops the timer. In the review session, she writes the invariant: left never decreases and the active window has unique characters. She adds a condition that the prior occurrence must be inside the current window.
On day 14 she tries pwwkew without viewing the fix and predicts length 3. She also explains why the longest substring need not be a subsequence. The second session measures understanding of the earlier error, not merely the ability to type faster.
| Attempt | Observed failure | Repair | Fresh proof |
|---|---|---|---|
| Timed day 13 | Left moved backward on old a. | Only use last-seen index if at or right of left. | Trace pwwkew and test result 3. |
After day 21
Keep the next step specific.
Review the lowest rubric dimension and the problem families you missed. If binary-search boundaries remain weak, do a different sorted-array task and state its interval convention. If recursion still feels opaque, define the state and base cases for a small bounded input before coding. If the role case was weak, use a fresh data/API/automation fixture.
The 20-problem set supplies tested examples, but do not loop through familiar answers until you can recite them. Change constraints, inputs and output contracts. A real interview may emphasize different skills; use this plan as a foundation for targeted practice.
When to repeat or accelerate
Use the checkpoint result to change the schedule.
If day 7 reveals that dictionary operations are still unclear, spend another session on frequency counts before starting sliding windows. The window algorithm itself uses a dictionary of last-seen indices, so a weak foundation will reappear as a pattern failure. If you already know the day 8–10 patterns, skip repetitive warm-up problems but still perform the changed-case and explanation checks.
Keep a short weekly summary: strongest invariant, smallest failing input, one complexity correction and one role-shaped task. That summary gives you a clear starting point for the next week. It also prevents a plan from becoming a series of unchecked boxes.
Run the examples locally
Keep the same interpreter for code and tests.
The course’s reference functions were run with Python 3.12.14. To practise, place a function and its assertions in a local file and run them with your Python 3.10+ interpreter. For a larger suite, use the standard-library unittest runner. Record the interpreter version when a behavior question depends on language features.
Do not copy a solution and mark the day complete merely because the test suite is green. Change one input, predict the result, and explain why the same invariant still applies. If a snippet relies on an import such as Counter, include that import before running it. A clear setup makes a worked example reproducible.
FAQ
Questions about this skill.
Must I finish in exactly 21 days?
No. Repeat a day or extend the schedule when a changed-case test fails.
Should every attempt be timed?
No. Timed sessions reveal pacing issues; untimed reflection repairs understanding.
Is a high rubric score a job guarantee?
No. It is a local study aid, not an employer assessment.
Continue with the course
Build reliable Python interview skills.
Review the course options and choose your next learning step.