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 transfers table with wallet_id, coin, direction ('in' or 'out'), amount_base_units, fee_base_units, state and confirmed_at, write SQL that returns, for each wallet, coin and UTC day, total deposits, total withdrawals including fees, and the net flow, counting only confirmed transfers.
A new Gmail spam model catches more spam in offline evaluation and is much cheaper to serve. The launch requirement is that it must not meaningfully increase legitimate mail sent to spam. Design the experiment and the decision rule.
A Prime Video live event runs from second 0 to T, and several camera recordings are available as [start, end] intervals. Return the minimum number of clips whose union covers all of [0, T], or -1 if it cannot be covered.
Given a retailer's cart of line items (brand, unit wholesale price in cents, quantity) and a map of each brand's minimum order amount, return how far below its minimum each brand in the cart is. Brands that meet their minimum should not appear in the result.
Given an ordered extended access list (action, protocol, source and destination with wildcard masks or host or any, optional destination port operator) and a packet, return the action of the first matching entry and its line number, applying the implicit deny at the end.
Given positive integer weights for a set of ads, design a class whose pick() returns an ad index with probability equal to its weight divided by the total weight. pick() will be called many times.
Given an array of daily demand multipliers, one per warehouse, return an array where entry i is the product of every multiplier except the one at i, without using division and in O(n) time.
Using an events table (project_id, distinct_id, event_name, event_time), write SQL that returns, for each day in the last 30 days, daily active users, trailing 28-day active users, and their ratio.
A checkout service must check every cart item against a set of 100 million restricted product ids, and holding them in a hash set needs many gigabytes per host. Implement a Bloom filter front check and size it for a 1 percent false positive rate.
Design a set of idle driver IDs supporting add(id), remove(id) and sample() in average O(1), where sample() returns a uniformly random current member, for example to pick drivers for a quality survey.
A People You May Know ranking change increased friend requests sent by 10% but the acceptance rate fell from 40% to 37%. Decide whether this is good for Facebook and how you would evaluate it fully.
Describe a time something you built or changed broke in production. What did you do in the first hour, what was the root cause, and what changed afterward?
Design an approach that uses language models to score management tone and guidance changes in earnings call transcripts, and explain how you would validate that the resulting score adds value beyond existing signals.
Given a sequence of request latencies and a window size k, return the median latency for each window of k consecutive requests (average of the two middle values when k is even), faster than re-sorting each window.
WhatsApp events are logged in UTC, but retention should use the user's local day. Using a users table with a timezone name, build Day-1 and Day-7 retention per local signup date and report how many users change cohort compared with the UTC version.
Reverse the nodes from position left to position right (1-indexed, inclusive) of a singly linked changelog in one pass, leaving the rest of the list untouched.
Google Assistant's speech recognizer reports a single word error rate on its test set. Explain how WER is computed, how to aggregate it correctly, and how you would evaluate quality across accents and locales so that weak groups are not hidden.
Given the raw text of a URL query parameter value, parse it like atoi: skip leading spaces, accept one optional sign, read digits until the first non-digit, and clamp the result to the signed 32-bit range. Return 0 if no digits are read.
For each billing account, compute month-to-date net cost through yesterday and the cost for the same span of the previous month, handling months of different lengths, and report growth.
Design the session layer for a speech-to-speech API where developers connect over WebRTC or WebSocket, stream microphone audio, and receive model audio back with barge-in support and sub-second response latency.
Get the full picture with our company interview guides.
Tell us what you were asked. Get 1 AI interview credit for each approved report.