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.

PYTHON LESSON PREVIEW
Three-week study planLearn → test

Core idea

Alternate solution attempts with tests, explanations and review.

Week 1: foundations
Week 2: patterns
Week 3: transfer
Check the output and reasoning.Compare the result with expected outputs and edge cases.

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.

Launching soon!
We’re putting the finishing touches on this course. Please check back for updates.

Daily session

Finish with evidence, not only an answer.

Illustrative 40-minute practice session
MinutesActionOutput
0–5Read prompt; state contract and assumptions.Input/output/edge policy.
5–20Write a correct baseline or trace.Runnable function.
20–30Test normal and edge cases.Expected/actual record.
30–40Explain 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.

Week one
DayFocusTaskEvidence
1BaselineComplete self-scored check; record two gaps.Gap log.
2Syntax + contractsWrite three functions with explicit empty behavior.Three tests.
3Lists + stringsTrace indexing, slicing and mutation.Boundary fixture.
4Sets + dictionariesCompare membership and counting.Complexity note.
5Two-sumWrite brute force then map version.Invariant + duplicate test.
6TestingAdd normal, empty and adversarial cases.Regression suite.
7CheckpointExplain 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.

Week two
DayFocusTaskEvidence
8Two pointersSolve exact palindrome and merge sorted lists.Index trace.
9Sliding windowSolve longest unique substring.Trace abba.
10CountersAnagrams and frequency ties.Tie policy.
11Binary searchInclusive and lower-bound contracts.Last-index test.
12DebuggingAliasing, defaults and iterator state.Five failure fixtures.
13Timed setTwo new problems under chosen time limit.Error classification.
14CheckpointRedo 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.

Explore course options →

Days 15–21

Move to constrained and role-shaped tasks.

Week three
DayFocusTaskEvidence
15IntervalsMerge touching intervals.Boundary convention.
16GraphsBFS distance and unreachable nodes.Queue invariant.
17RecursionDefine subset-sum state and base cases.State trace.
18OptimizationCompare recursion and reachable totals.Time/space note.
19Role taskChoose data, backend or automation case.Applied test.
20Mock explanationClarify, code, test and explain one new task.Communication rubric.
21ReviewRevisit 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.

Original 0–10 practice rubric
Dimension012
ContractUnstated.Partial.Inputs, output and edge policy clear.
CorrectnessFails sample.Passes sample only.Passes normal and changed case.
TestingNone.One test.Boundary and adversarial tests.
ComplexityMissing/incorrect.Time only.Time and space with assumptions.
ExplanationPattern 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.

Illustrative practice log
AttemptObserved failureRepairFresh proof
Timed day 13Left 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.

Take the next step →
Scroll to Top