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
Implement a fixed-capacity cache for stock quotes where each entry has its own time-to-live. get returns a value only if it has not expired, put inserts or refreshes an entry, and when the cache is full it should evict an expired entry if one is cheaply available, otherwise the least recently used entry, all in O(1) amortized time.
The Instagram DM team wants a metric for conversations started. Define what counts as a conversation versus a single message, and explain why the definition matters.
Design a pipeline that lets marketplace sellers upload large feeds (millions of listings in CSV or JSON) to create or update products, prices, and inventory, with per-row validation results.
A logistic regression model for ad conversion uses millions of sparse binary features. Compare L1 and L2 regularization for this model and recommend one.
Each connected account lists identifiers it has used (bank account fingerprints, device ids, emails). Group accounts into clusters where two accounts belong together if they are linked by a chain of shared identifiers, and return the clusters sorted.
Orders from Tier 3 towns fell 15% week over week while Tier 1 orders were flat. Walk through how you would find the cause and what you would do in the first 48 hours.
A circular rack is a list of 1 (healthy) and 0 (drained) slots where the last slot is adjacent to the first. Return the minimum number of swaps of any two slots needed to make all healthy servers contiguous around the ring.
Quote a market on the sum of three fair dice, then on the maximum. How do your quotes change after you are told one of the dice shows a 6?
You roll a fair die and are paid the face value of your final roll. You may roll up to three times, and after each roll you choose to stop or roll again (losing the current value). What is the optimal strategy and its expected payoff?
Using tables of submitted claims and their adjudication outcomes, write SQL that reports, for each payer and month of submission, the share of claims denied on first submission and the top denial reason.
Instagram wants to test a simpler flow for users to appeal content removals. Define what success looks like and the metrics that would show whether the new flow improves fairness without flooding reviewers.
Given an encoded string where k[s] means s repeated k times, with arbitrary nesting and multi-digit k, return the fully expanded string.
A binary tree models chained recommendation branches, where each node holds an engagement score that can be negative (for example, a skip penalty). Return the maximum sum along any path, where a path connects any two nodes through parent-child links and visits each node at most once.
There are four doors with a prize behind one. You pick a door, the host (who knows where the prize is) opens one of the other doors that is empty, and you may stay or switch to one of the two remaining unopened doors at random. What are the win probabilities for staying and switching?
Each quote locks a rate for a validity window. Given quotes, a time series of live rates and a list of funding events, return the rate actually applied to each transfer: the locked rate if funded inside the window, otherwise the latest live rate at funding time.
An engagement needs m distinct roles (m up to about 15) and there are n bench consultants, each with a cost for each role they are qualified for. Assign one consultant per role, each consultant to at most one role, minimizing total cost, or return -1 if impossible.
You regress next-day returns on a signal that is observed with independent measurement noise. Derive how the estimated slope differs from the true slope, and explain what it means for forecasting and for estimating the true effect.
A block order is split into child slices that must be executed in the given order, with the whole order finished within D days. Find the smallest daily volume cap that makes this possible.
A traffic light cycles through fixed phases such as NS_GREEN, NS_YELLOW, EW_GREEN, EW_YELLOW with given durations. A pedestrian button pressed during a green phase shortens that green so it ends at most cut seconds after the press; given sorted press times and arbitrary query times, return the phase at each query.
A stream reports minute indices when a driver was seen online, in any order and with duplicates. Support add(minute) and intervals(), which returns the current list of disjoint, sorted, inclusive online intervals formed by merging consecutive minutes.
Get the full picture with our company interview guides.
Tell us what you were asked. Get 1 AI interview credit for each approved report.