A practical coding interview asks you to build something a working engineer would build. Instead of finding the trick to a graph puzzle, you write a rate limiter, a retry wrapper, a log parser, a worker pool or a small in-memory store, usually in 45 to 90 minutes, in a real editor, often with tests. The format is common for backend, infrastructure and ML platform roles, sometimes alongside an algorithm round and sometimes in place of one.
This guide covers what the format looks like, how it is graded, and how to practise for it.
How it differs from an algorithm round
An algorithm round tests whether you can recognise a problem class and apply the right technique. The input is clean, the function signature is given, and the answer is mostly right or wrong. Interviewers care about time complexity and whether you reach the optimal approach.
A practical round tests whether you can turn a loose spec into working, maintainable code. The differences show up in a few places.
- The input is messy. Log lines have missing fields, timestamps arrive out of order, and payloads contain the wrong types. Handling bad input is part of the problem, not an afterthought.
- The algorithm is usually easy. A dict and a loop, a heap, or a deque covers most of it. The difficulty is in edge cases, state and interfaces.
- Concurrency comes up. Many questions involve asyncio or ask what would break if two callers hit your code at once. LeetCode almost never tests this.
- Time is a real input. Timeouts, rate limits, TTLs and backoff mean your code depends on a clock, and good answers make that clock testable.
- The question grows. You rarely solve one fixed problem. Part one is a warm-up and parts two to four add requirements that test whether your first design bends or breaks.
Algorithm practice still helps, because you need to pick the right data structure without thinking about it. It doesn't prepare you for the rest.
Common formats
Implement a component against an API
You get a class or function signature and a description of the behaviour. "Implement RateLimiter with allow(client_id) -> bool, 10 requests per second per client." Sometimes you get a fake dependency to call, such as an async fetch(url) that sleeps and occasionally raises. This is the most common format, and every problem on this site follows it.
Extend existing code
You get a few hundred lines of working code and a feature request. Add caching to this client. Make this downloader resume partial files. Support a new record type in this parser. The test is whether you read before you write, follow the conventions already in the file, and change the smallest amount needed.
Debug
You get code that mostly works and a failing test or a bug report. Typical planted bugs include a race across an await, an off-by-one in a window boundary, a swallowed exception, a mutable default argument, or a time.sleep in async code. Interviewers watch how you narrow it down. Reproduce first, read the failing assertion, form a hypothesis, then check it with a print or a smaller test, and don't change code at random.
Multi-part with follow-ups
The most common structure overall. Part one might be "parse these logs and count requests per model". Part two adds latency averages. Part three asks for p99. Part four says the file is 200 GB. Each part builds on your previous code, so a rushed part one costs you in part three. You often won't reach the last part, and that is normal. The interviewer cares more about how cleanly you got to part three than whether you finished part four.
What interviewers grade
Rubrics differ, but they tend to cover the same ground.
Correctness under edge cases
Passing the happy path is the minimum. Interviewers probe empty input, a single element, duplicates, values at exactly the boundary, malformed records and very large inputs. Say these out loud before you code, and decide each one explicitly. "An event exactly 60 seconds old falls outside the window" is a decision. Leaving it to whatever your < happened to do is not.
API clarity
Is the interface something another engineer could use without reading your implementation? Good names, a signature that matches the spec, sensible return types, and errors raised as specific exceptions rather than returned as magic values. If the spec is ambiguous, ask, and then write the decision down as a docstring or a comment.
Concurrency safety
If your component holds state and could be called from several coroutines, the interviewer will ask what happens then. Know where your awaits are and what shared state can change across them. Bound concurrency explicitly with a semaphore or a worker pool rather than firing off unlimited tasks. The asyncio interview guide covers the patterns in detail.
Error handling
Which errors do you catch, which do you let propagate, and what state is the system in afterwards? Catch specific exceptions. Validate before you mutate, so a bad record never leaves a counter half-updated. Clean up in finally or async with. Never swallow asyncio.CancelledError. In retry questions, explain which errors are worth retrying and why retrying a non-idempotent operation is dangerous.
Tests
Some interviews hand you a test suite. Others ask you to write tests, and some leave it to you. Writing even two or three small tests unprompted is a strong signal. Test behaviour the caller can observe, not internals. For anything time-based, inject the clock so tests don't depend on real sleeps.
Communication
Talk through your plan before coding, in two or three sentences. Say what data structure you'll use and why. When you make a trade-off, name it. When you get stuck, say what you're trying, because silence makes it impossible for the interviewer to help you. Questions back to the interviewer are fine and often expected.
Time management
A working simple version at 30 minutes beats an elegant half-finished one at 60. Get part one passing, then improve it. If you notice a better design midway, say so and judge whether there is time to refactor. Interviewers notice candidates who spend 20 minutes on input validation nobody asked for, and they notice candidates who skip validation the spec required.
A practice plan
Here is a plan that uses this site. It assumes a few weeks with a few hours a week. Compress it if you have less time.
Calibrate in week one
Pick three problems from different topics. Start with the two easy ones, Inference Log Summary for parsing and hash maps and Chunked File Copy with Bounded Memory for file I/O, then try Delimited Stream Parser. Solve each without a timer. Your goal is to learn the workflow and find your weak spots.
Use Run while you work. It executes only the visible test_example_* tests, which check the worked examples from the statement. Treat a passing Run as "the basic idea works" and nothing more. Then Submit, which runs the full suite, including the edge-case tests. Note which failures surprised you. Those are the edge cases you didn't think to list, and that list is your homework.
Timed attempts in weeks two and three
Each problem shows an estimated number of minutes, which is roughly how long an interviewer would budget for it. Set a timer for that number and treat it as a real interview.
- Spend the first two or three minutes reading the statement and writing down the edge cases you'll handle, before touching the starter.
- Get the examples passing with Run.
- Before you Submit, spend two minutes trying to break your own code. What happens on empty input, on duplicates, at the boundary, or when two coroutines call it at once?
- Submit. If a test fails, read its name and docstring, fix it, and keep the clock running.
If you finish well under time, do the problem again in a different way, or add one of the follow-ups. If you blow through the time, stop and read the solution. Struggling for another hour teaches less than understanding the reference and redoing the problem from scratch two days later.
Focus on asyncio, rate limiting, retries and caching. These come up often and have the most interview-specific detail.
- 06Sliding Window Rate Limitermedium
Build a per-user sliding window log rate limiter that allows at most N requests in any window of W seconds.
- 12Inference Worker Poolmedium
Run inference requests through a fixed pool of asyncio workers sharing one queue, isolate failures, and return results in input order.
- 16Async Circuit Breakerhard
Implement an asyncio circuit breaker with closed, open and half-open states, a single recovery probe, and protection against stale in-flight calls.
- 20Dynamic Request Batcherhard
Group concurrent inference requests into batches that flush when full or when the oldest request has waited long enough, with cancellation and drain.
- 21Async TTL Cache with Request Coalescingmedium
Build an asyncio cache whose entries expire after a TTL, where concurrent misses for the same key share one fetch that survives caller cancellation.
- 22Async Retry with Exponential Backoffmedium
Retry a failing coroutine with capped exponential backoff, re-raise the last error, and never swallow cancellation.
- 25Async Request Deduplicatorhard
Collapse concurrent fetches for the same key into one shared call, with per-caller timeouts that never cancel the shared work.
Read the explanation, especially the follow-ups
Every problem has a reference solution and an explanation behind a reveal. Read it even when you passed. The Pitfalls section lists the mistakes graders look for, and you may have dodged one by luck. The Follow-ups interviewers ask section is where multi-part interviews go next. For each follow-up, sketch out loud how you'd change your code. If the answer is "rewrite most of it", your first design was too rigid, and noticing that is the point of the exercise.
Mixed and hard problems in week four
Move to medium and hard problems across concurrency, worker pools, streaming and design. Pick problems at random rather than by topic, so you practise recognising what a problem needs without the topic label as a hint. Talk out loud while you solve, even alone. It feels awkward, and it is a skill the real interview grades.
- 12Inference Worker Poolmedium
Run inference requests through a fixed pool of asyncio workers sharing one queue, isolate failures, and return results in input order.
- 16Async Circuit Breakerhard
Implement an asyncio circuit breaker with closed, open and half-open states, a single recovery probe, and protection against stale in-flight calls.
What to bring on the day
- A short opening routine. Restate the problem, list edge cases, state your data structures, then code.
- Knowledge of the standard library you'll actually use. That means
collections(deque,defaultdict,Counter,OrderedDict),heapq,itertools,time.monotonic,dataclasses, and the core ofasyncio(TaskGroup,gather,Semaphore,Queue,timeout). - A habit of writing a quick test or a few asserts before calling something done.
- Willingness to say "I'd do X in production, here I'll do Y to save time". Interviewers want to see that you know the difference.
Practical rounds reward code that handles the cases that matter, reads clearly, fails loudly and survives the next requirement. Every problem here gives you a spec, a test suite and a time estimate to practise against. See about for how the in-browser runner works, or go back to the problem list.
Frequently asked questions
What is a practical coding interview?
It asks you to build something a working engineer would build, such as a rate limiter, a retry wrapper, a log parser or a worker pool, usually in 45 to 90 minutes in a real editor. The spec is looser than an algorithm question and the input is messy on purpose.
How is a practical interview different from a LeetCode-style round?
The algorithm is usually easy, and the difficulty sits in edge cases, state, interfaces, concurrency and code that depends on a clock. The question also grows through follow-ups, so your first design has to survive new requirements.
What formats do practical coding interviews use?
The common ones are implementing a component against a given API, extending existing code, debugging code with a planted bug, and multi-part problems where each part adds a requirement to your previous code.
What do interviewers grade in a practical round?
Correctness on edge cases, a clear API, concurrency safety, error handling, tests, communication and time management. A working simple version early usually scores better than an elegant unfinished one.
Is it bad if I don't finish every part?
No. Multi-part questions are often designed so most candidates don't reach the last part, and interviewers care more about how cleanly you reached the parts you finished.
How should I practise for a practical coding interview?
Solve problems against the stated time estimate, list edge cases before coding, use the example tests while working and the full suite before you call it done, then read the reference explanation and sketch how you would handle each follow-up.