Coding interview questions
Practical code you narrate as you write it: parsing messy input, limits and retries, tests you can run, and the edge cases you name first.
Questions 1 to 50 of 53.
- Parse a CSV export with inconsistent dates, stray quotes and repeated header rows into clean records, and report what you dropped.
- Parse web server logs and report the slowest endpoints by p95 latency.
- Write a retry wrapper with exponential backoff and full jitter. Which errors should it not retry?
- Build retrieval over a folder of text files using TF-IDF with no external libraries. Return the top passages with scores.
- Here is a long function that reads files, calls an API and writes a report. Refactor it so you can test it.
- Implement a per-user token bucket rate limiter. Then make it work across several processes.
- Implement a sliding-window rate limiter and explain its memory cost.
- Before you write code for this parser, list the inputs that will break it.
- Build a small CLI with subcommands to import, validate and export records. How do you structure it?
- Compare two exports of the same table and report added, removed and changed rows.
- Find the longest stretch in a sensor log where no reading repeats.
- Implement an order state machine that rejects illegal transitions.
- Merge overlapping maintenance windows reported in different time zones.
- Model a small inventory system with classes in about a page of code. Then add a new requirement I give you.
- State the time and space complexity of your solution and say when it would matter in production.
- Trim chat history to fit a token budget without cutting a message in half.
- Validate a configuration file against rules and print errors a user can act on.
- Write a failing test that reproduces this reported bug before you fix it.
- Write a prompt-template renderer that fails loudly on missing variables.
- Assign support tickets to agents by priority and deadline.
- Compute rolling five-minute averages per key from an unbounded event stream.
- Compute top-k cosine similarity over a large set of vectors without a vector database. Make it fast enough.
- Extend a feature in a Python codebase you have never seen, using an AI assistant, and explain every change it made.
- Flag anomalies in a sensor series with a rolling z-score and explain where it fails.
- Flatten deeply nested JSON from three versions of an API into one schema.
- Given a table of customer events, build a baseline churn model and say whether it is good enough to use.
- Here is a short piece of unfamiliar code with one bug that customers hit. Find and fix it, and explain how you found it.
- Here is the documentation for a library you have never used. Use it to implement a small feature in the time we have.
- I will describe a feature vaguely. Ask what you need, then implement it.
- Implement a circuit breaker with half-open probing.
- Implement an in-memory job queue with priorities, retries and a dead-letter list.
- Implement BM25 scoring and compare it with TF-IDF on the same queries.
- Implement feature-flag evaluation with percentage rollouts that stay stable for each user.
- Integrate with a mock REST API that paginates, rate-limits and sometimes fails.
- Model API responses in TypeScript so invalid states cannot be represented.
- Order package installs given their dependencies and report any cycles.
- Parse and evaluate expressions written as nested function calls, such as add of one and the product of two and three.
- Parse model output into JSON and retry with the error message when it fails.
- Run many HTTP requests in TypeScript with a small cap on how many are in flight.
- Trace one request through a large codebase you have never seen and draw its path.
- Turn page-by-page extracted text into a JSON index of section titles and page numbers.
- Verify webhook signatures and reject replayed requests.
- Write a client that pages through an API with cursor pagination and survives restarts.
- Write a consumer that processes a stream with a bounded buffer and applies backpressure.
- Write a script that scores model outputs against a ground-truth file and groups errors by type.
- Write a text chunker that respects headings and never splits a table.
- Write a worker pool that runs tasks concurrently, caps parallelism and collects errors per task.
- An agent’s code does not match the flow diagram you are given as the source of truth. Find the bugs.
- Deduplicate customer records where names and addresses are spelled differently.
- Implement an idempotent request handler using idempotency keys, including two identical requests arriving at once.