Practice questions for 300+ companies, plus questions candidates reported from their interviews.
11,534 questions · 341 companies · 1,080 reported by candidates
Showing 11,534 results
Write a Python function that takes a list of (user_id, date) login events and a list of day offsets, and returns for each first-login cohort date the fraction of users who logged in exactly N days later, marking offsets not yet observable as None.
Design a throttle that receives (timestamp, notification_key) pairs in time order and returns whether the notification should be sent. A key may be sent at most once every 10 seconds, and suppressed attempts do not reset the cooldown.
Among 200 YouTube creators, each creator subscribes to each other creator independently with probability 0.05. What is the expected number of mutual subscription pairs and the expected number of creators with no mutual pair at all?
Tell me about a feature or change you owned that caused a problem for customers after it shipped, how you responded, and what you changed afterward.
Given a list of half-hourly smart meter readings (timestamp, kWh) and a time-of-use tariff made of daily rate bands, some of which wrap past midnight, compute the customer's bill in pence including a daily standing charge.
Given a binary expression tree with integer leaves and the operators + - * /, produce its infix string using the fewest parentheses that preserve the tree's meaning under standard precedence and left associativity.
Roblox is launching a feature that lets a player invite friends into a party that joins experiences together. Design an experiment to measure its effect on engagement when treated users' behavior directly changes what their untreated friends do.
A Reels ranking experiment shows +4% watch time per user but -6% comments per user. Decide whether to ship and explain how you would investigate the conflict.
Before running an A/B test, you want to estimate how a new widget recommendation policy on the Amazon homepage would perform using logs from the current randomized-exploration policy. Explain inverse propensity scoring, its variance problems, and implement IPS and self-normalized IPS.
Given a large set of 2D vertices in a drawing and a pick tolerance, build a structure that answers many cursor queries: return the nearest vertex within tolerance of the cursor, or nothing if none is close enough.
Tell me about a time you delayed or rolled back something you built because data or monitoring suggested a problem others were willing to ignore.
Given a raw card number string that may contain spaces or dashes, return its brand (visa, mc, amex), "unknown" for a valid number with no matching brand, or "invalid" if it fails format or Luhn checks.
Implement a fixed-capacity queue where producers block when it is full and consumers block when it is empty, with a put timeout and a clean shutdown that lets workers drain remaining items.
Given a time-sorted list of (timestamp, altitude) telemetry samples from one flight, report every gap longer than a threshold and every sample whose altitude differs from the median of the previous k accepted samples by more than a spike threshold.
Design the daily job that reconciles Meta's internal payment records against settlement files from card processors and banks, flagging missing, duplicated, or mismatched transactions.
Design the system that ingests raw depth-of-book feeds from 200+ exchanges and ATSs, builds books, and delivers normalized top-of-book and depth updates to many trading strategies with single-digit microsecond added latency.
For a 7B parameter model trained with pure data parallelism on 64 GPUs connected by 400 Gb/s InfiniBand per GPU, estimate the time of one gradient all-reduce with a ring algorithm and explain how you would reduce it.
A cold room grid holds empty bins, fresh crates and spoiled crates. Each hour, spoilage spreads from every spoiled crate to fresh crates that share an edge. Return the number of hours until no fresh crate remains, or -1 if some crates can never be reached.
Describe a time a change you made caused a production incident, ideally during a busy period. Walk through how you responded, how you communicated, and what changed afterwards.
Amazon Last Mile changed the stop sequencing algorithm and measured eight delivery routes before and after. Show that the choice between a paired and a two-sample t-test flips the conclusion, and say which is right.
Get the full picture with our company interview guides.