61Build a customer-support agent over a fake product/SQL database: tool-calling, retrieval, and a control loop.▼hardSierraDecagonOpenAI2 replies◆ premiumA live-coding round that separates people who have shipped agents from people who have read about them. The signal is a real plan-act-observe loop, tools that hit an actual SQL database, guardrails that stop the obvious failures, and a concrete evaluation plan, not a single prompt that pretends to be an agent.Open full answer →
62Build a small in-memory document indexer and retriever from scratch (inverted index + BM25), then add a vector option.▼mediumAppleGleanAnthropic2 replies◆ premiumA bridge between classic DSA and modern RAG. The signal is building a working inverted index and a correct BM25 score by hand, reasoning about its complexity, and then knowing exactly when you would reach for embeddings and an ANN index instead.Open full answer →
95Build an in-memory key-value database, then extend it across stages: TTL, transactions, snapshots.▼hardAnthropicOpenAIGoogle1 replies◆ premiumThe canonical multi-round build screen: a simple key-value store that grows new requirements every stage (TTL, transactions, scans). The signal is not stage 1, it is whether your code absorbs stage 4 without a rewrite. Here is how to design for it.Open full answer →
96Design a GPU credit system: issue, spend, and expire credits.▼hardOpenAIAnthropicNVIDIA1 replies◆ premiumA credit ledger that grants GPU-hours, spends them, and expires unused grants. The trap is which grant to spend first. Here is the FIFO-by-expiry design.Open full answer →
97Key-value store with transactions: begin, commit, rollback, nesting.▼hardAnthropicOpenAIGoogle2 replies◆ premiumWrites inside a transaction commit or get thrown away, and transactions nest. The overlay-stack design that makes rollback O(1) without touching the base.Open full answer →
98Convert sampled call-stack profiler data into a flame tree and find the slowest function.▼mediumGoogleOpenAIApple1 replies◆ premiumA practical build screen: turn a stream of sampled call stacks into a flame tree, then report self-time vs total-time per function. The trap is conflating the two times. Here is how to aggregate the tree and rank the hot functions.Open full answer →
99Find duplicate files in a directory tree by content: size prefilter, then hashing.▼mediumGoogleAppleAmazon2 replies◆ premiumA grounded systems-coding screen: find files with identical content across a tree. The naive all-pairs hash is wasteful. The signal is the size prefilter and a cheap-hash gate before the full hash. Here is the layered approach.Open full answer →
100Simulate infection spreading across a 2D grid with multi-source BFS, passing staged test cases.▼mediumGoogleAmazonMeta2 replies◆ premiumThe rotting-oranges family of build screens: a state spreads outward one step per tick across a grid, and the spec gains rules each round. The signal is multi-source BFS by layers, not per-cell loops. Here is the design that absorbs each new test case.Open full answer →
101Spreadsheet dependency engine: formula eval and circular references.▼hardSierraGoogleApple2 replies◆ premiumCells hold values or formulas over other cells, and an edit must recompute dependents without looping forever. Dependency graph plus cycle detection.Open full answer →
102Build a small tool to a loosely defined, shifting spec: clarify, structure for change, adapt mid-session.▼mediumGoogleAnthropicOpenAI2 replies◆ premiumGoogle's 'vibe coding' screen: the spec is deliberately vague and changes mid-interview. The signal isn't the algorithm, it's whether you clarify before coding, structure for change, and keep tests green while the requirements move. Here is how to run that loop.Open full answer →
115Build a decision tree classifier from scratch: pick splits by Gini or entropy, then predict.▼mediumAmazonGoogleMeta2 replies◆ premiumA from-scratch classic that tests recursion plus the split criterion math. The signal is computing impurity correctly, choosing the best threshold by information gain, and knowing the stopping rules. Here is a clean recursive implementation.Open full answer →
117Implement PCA from scratch via SVD: center the data, project onto top components, report variance.▼mediumGoogleMetaNVIDIA2 replies◆ premiumA from-scratch favorite that tests linear algebra fluency. The signal is centering first, using SVD instead of forming the covariance matrix, and reading variance off the singular values. Here is the implementation and the details interviewers push on.Open full answer →
118Implement a Gaussian Mixture Model with EM from scratch: E-step responsibilities, M-step updates.▼hardGoogleMetaNVIDIA2 replies◆ premiumA from-scratch test of the EM algorithm and soft clustering. The signal is the two alternating steps (responsibilities then weighted re-estimation), log-sum-exp for stability, and knowing how GMM generalizes k-means. Here is the implementation.Open full answer →
124Build a tiny autograd engine from scratch: a scalar Value with backprop over a computation graph.▼hardOpenAIGoogle DeepMindMeta2 replies◆ premiumA from-scratch test of how PyTorch actually works under the hood. The signal is building a computation graph during the forward pass, local derivatives per op, and a topological-order backward pass that accumulates gradients. Here is a minimal engine.Open full answer →
125Implement a WordPiece tokenizer from scratch: greedy longest-match-first subword segmentation.▼mediumGoogleHugging FaceOpenAI1 replies◆ premiumA from-scratch test of subword tokenization. The signal is greedy longest-match encoding against a fixed vocabulary, the continuation-prefix convention, and how WordPiece differs from BPE. Here is the implementation.Open full answer →
126Build a mini data loader with sharding for distributed training: split data across workers without overlap.▼mediumMetaNVIDIAGoogle2 replies◆ premiumA from-scratch test of distributed input pipelines. The signal is partitioning data across workers with no overlap and no gaps, epoch-consistent shuffling with a shared seed, and handling the uneven-last-batch problem. Here is the implementation.Open full answer →
127Write a JSON parser from scratch. Now make it handle the partial JSON an LLM streams mid-generation.▼hardOpenAIAnthropicDatabricks◆ premiumThe classic recursive-descent exercise with an applied-AI twist: the JSON your model streams is truncated mid-token for the entire generation. The signal is a clean strict parser plus a small repair layer, not a second parser. Here is the implementation.Open full answer →
128Write an async batch caller for an LLM API: N requests, a concurrency cap, timeouts, and retries with backoff.▼mediumOpenAIAnthropicScale AI◆ premiumThe most job-shaped coding screen in Applied AI: fan out N LLM calls without melting the rate limit or losing the batch to one bad request. The signal is in the retry policy, not the async syntax. Here is the version that passes.Open full answer →
129Implement a minimal RAG pipeline end to end: embed and index a corpus, retrieve for a query, answer with citations.▼mediumAnthropicGleanPerplexity◆ premiumThe coding round version of the RAG question every candidate can describe in prose. Embed, index, retrieve, generate, cite. What separates a pass from a fail is the branch you write for when retrieval comes back with nothing worth quoting.Open full answer →
130Write three chunkers (fixed-size with overlap, recursive separator, semantic) and defend when each wins.▼hardGleanCohereDatabricks◆ premiumEveryone can recite the chunking tradeoff. Far fewer can write the splitter, keep the offsets a citation needs, and answer the question that kills the fixed splitter: what happens to a fact that straddles a boundary.Open full answer →
131Stream an LLM response to a browser. Handle cancellation, mid-stream failure, and a late guardrail.▼hardOpenAIAnthropicPerplexity◆ premiumEvery LLM product streams, and almost nobody can write the server. The interesting part is not the async generator, it is what happens when the user hits stop, the provider dies at token 90, or moderation flags text you have already put on the screen.Open full answer →
43Extract and clean a usable dataset from a messy real-world database using SQL plus Python (dedupe, types, nulls, joins, validation).▼mediumAnthropicDatabricksSnowflake1 replies◆ premiumThe applied data-wrangling screen: here is a grubby database, produce a clean analysis-ready table. The signal is profiling before transforming, doing set-based cleaning in SQL and row-level fixes in Python, joining without fanning out rows, and validating the output instead of trusting it.Open full answer →