Practice questions for 300+ companies, plus questions candidates reported from their interviews.
11,568 questions · 341 companies · 1,114 reported by candidates
Showing 11,568 results
Given a request log table for an inference API, write SQL that returns, for each model and day, the request count, the error rate, and the p50 and p95 time to first token computed over successful requests only.
Your service claims Lightning Deal slots using version-checked conditional writes to a key-value table. Build an in-memory fake of the table that supports conditional puts and fault injection, and use it to test the retry path when a concurrent writer wins.
Build an autocomplete component for the TikTok search bar: `record(query, times)` adds to a query's popularity and `suggest(prefix)` returns the three most popular queries starting with that prefix, ties broken alphabetically. Suggestions must be fast because they run on every keystroke.
Design the search bar that returns tasks, projects and people as the user types, across a workspace with hundreds of millions of tasks, showing only results the user is allowed to see.
Each Facebook Group member earns daily activity points. For every group and day, award a Top Contributor badge to members in the top 1 percent by trailing 28-day points (with at least 10 points, and always the top member), then count how many badges were newly gained each day.
Each API shard produces a log of request records already sorted by timestamp. Write a generator that lazily yields all records from all shards in global timestamp order, breaking ties by shard index, without loading every log into memory.
Tell me about a time a bug sat on the boundary between two teams, such as hardware and software, and each side believed the other owned it. How did you get to the root cause and what changed afterwards?
Given a log of test runs with test name, commit, and pass or fail, identify flaky tests (tests that both pass and fail on the same code) and rank them by how often their outcome flips across reruns, without confusing genuine regressions for flakiness.
Facebook Watch logs playback segments as (user, video, start_position, end_position). Users rewind and replay, so segments overlap. Compute how many distinct seconds of each video each user actually covered.
You have a model that predicts K possible future trajectories for each pedestrian, cyclist and vehicle near the robotaxi; explain how you would evaluate it, including minADE, minFDE and miss rate, and what those metrics hide.
A group of friends records who paid whom in a shared-expenses app. Return the minimum number of transfers needed so everyone's net balance becomes zero.
A pipeline of model steps is given as a dependency graph with a duration per step, and at most K steps can run at once. Compute a schedule that starts ready steps with the longest remaining critical path first, and return the makespan and each step's start time, rejecting graphs with cycles.
Files carry ACLs listing users and groups, and groups can contain users and other groups, including membership cycles. Return, for every file, the full set of users who can actually access it.
Upload transcode jobs arrive as (job_id, arrival_time, duration, priority), where a lower priority number is more urgent. With m identical workers, whenever a worker is free it takes the most urgent job that has already arrived (ties by earlier arrival, then job_id). Return the order in which jobs finish.
Given the plain text of a contract, find every defined term (written as (the "Term") or "Term" means), report terms that are used before the point where they are defined, and report terms defined more than once.
Given an occupancy grid with obstacle cells and a robot radius in cells, mark every cell within that BFS distance of an obstacle as unsafe, then return the shortest 4-connected path length from start to goal through safe cells, or -1.
Given the estimated durations of independent GPU work groups and a number of compute units, assign each work group to a unit so that the time until the last unit finishes (the makespan) is small. Return the makespan and the unit chosen for each work group using the longest-processing-time-first heuristic.
Facebook needs a churn definition for a retention dashboard. Many users visit only occasionally. Propose a definition with a time window and explain how you would choose the window.
A plant species classifier for Google Lens reaches 99% training accuracy but 71% on validation. Using learning curves, explain how you would decide whether to collect more data, regularize, or change the model.
Implement an evaluator for formula strings such as `(close - open) / vol` that supports numbers, named variables, unary minus, parentheses and the four arithmetic operators with standard precedence.
Get the full picture with our company interview guides.
Tell us what you were asked. Get 1 AI interview credit for each approved report.