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
TikTok's content taxonomy is stored as a binary tree of category nodes with unique names, and every video is tagged with one node. Given the root and two category names, return the deepest category that is an ancestor of both (a node counts as its own ancestor).
Implement an iterator that takes several shard iterators, each yielding (updated_at, listing_id) sorted newest first, and yields a single newest-first stream that emits each listing id only once, at its most recent update.
Two singly linked lists of balance transactions are each sorted by `(created, id)`, and some transactions appear in both. Merge them in place into one sorted linked list where every transaction id appears exactly once.
Using forecasts of daily OTC cold medicine demand for individual CVS stores as the example, explain the bias variance tradeoff and how you would tell whether a forecasting model is overfitting or underfitting.
Tell me about a time you joined a project in a domain you did not know well, and your early work went poorly as a result. How did you recover and what is your approach now to ramping up in a new area?
Given an undirected friendship graph as an adjacency map, return the minimum number of friendship hops between user A and user B, or -1 if they are not connected.
You are asked to evaluate a model that forecasts next day returns for a set of futures using features built from rolling windows of past data. Explain why standard k fold cross validation is wrong here and design a validation scheme that avoids leakage.
Reorder a singly linked list L0 -> L1 -> ... -> Ln into L0 -> Ln -> L1 -> Ln-1 -> L2 -> ... in place, so a Discover carousel alternates between the freshest and oldest cards.
Two players take turns flipping two consecutive '+' characters into '--' in a string. The player who cannot move loses. Decide whether the first player can guarantee a win.
Tell me about a time a colleague or someone you mentored was struggling, what you did to help them improve, and how it turned out.
Given a directed graph of shipping legs with costs, find the cheapest way from src to dst when you may apply up to k coupons, each halving the cost of one leg (rounded down). Return -1 if dst is unreachable.
TurboTax wants to test a new prompt that suggests upgrading from Deluxe to Live Assisted when a filer hits a complex section. Design the experiment, choose metrics and guardrails, and explain how the short, seasonal filing window affects the design and the read.
Given an array of daily net balance changes (which may be negative) and a target k, count the contiguous ranges of days whose changes sum to exactly k.
A Firebase Analytics session is a string where each letter is an event type. Split it into contiguous segments such that no event type appears twice within one segment, using as few segments as possible, and return the count.
Process a time-ordered stream of dispute events (create, submit evidence, accept, escalate, close inquiry, issuer decision) and track each dispute's status. Reject events that are not valid from the current status, auto-lose chargebacks whose evidence deadline passed, and report final statuses plus rejected events.
An analyst estimates whether Gmail Smart Reply speeds up email responses by regressing reply time on Smart Reply use, controlling for reply length and whether the thread got a reply. Explain what is wrong with these controls and how you would set up the analysis.
Design a DNS-based traffic routing service that answers each client query with the endpoint in the region that gives that client the lowest latency, while removing unhealthy regions automatically.
In a driver promotion game you roll a fair die and may accept the value as a bonus in dollars or reroll, up to two rerolls total, and must keep the final roll. What is the optimal strategy and expected payout?
Tell me about a time you disagreed with a stakeholder, such as a trader or researcher, about what to build or how. How did you handle it, and how did it end?
Given a list of C struct fields with sizes and alignment requirements, compute the struct's size including padding and find a field order that minimizes it, as you would when shrinking a hot record in a C++ service.
Get the full picture with our company interview guides.
Tell us what you were asked. Get 1 AI interview credit for each approved report.