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 list of (advertiser, revenue) entries, one per day, and a window size k, return the maximum total revenue over any k consecutive days in which no advertiser appears twice, or 0 if no such window exists.
Design a system that delivers vehicle software updates (multi-gigabyte images for many ECUs) over the air to hundreds of thousands of vehicles with staged rollouts, integrity guarantees, resumable downloads over poor cellular links, and safe rollback.
Given the head of a singly linked list, relink it so all nodes at odd positions (1st, 3rd, ...) come first, followed by all nodes at even positions, keeping relative order in each group, in O(n) time and O(1) space.
Implement a fallback chain that sends an LLM request to an ordered list of providers, moving to the next on failure, with a circuit breaker per provider that opens after consecutive failures and allows one probe after a cooldown.
Most Facebook users find that their friends have, on average, more friends than they do. Explain mathematically why this happens and compute the expected friend count of a randomly chosen friend.
A new product has two 5-star reviews while an established one averages 4.6 over 1,000 reviews. Build a Bayesian estimate of each product's true rating so search and recommendation do not overrank tiny samples, and explain how to set the prior.
From month-end loan snapshots, build a transition matrix showing, for loans in each delinquency bucket last month, what fraction are in each bucket this month (current, 30, 60, 90+, paid off). Handle loans that leave or enter the portfolio.
Given a list of (timestamp, item_id, event) robot events where event is Started, Failed or Succeeded, and a max retry count, compute each queue item's final status (Successful, Failed, Retrying or InProgress) plus a count per status. Events can arrive out of order and can be duplicated.
A grid of deflectors has cells with 1 (a board from top-left to bottom-right, sending marbles right) or -1 (top-right to bottom-left, sending marbles left). Drop one marble at the top of each column and return the column where it exits the bottom, or -1 if it gets stuck against a wall or in a V shape.
An n by n grid of unit squares contains '/', '\', or ' ' in each cell, where slashes are diagonal walls. Return the number of separate regions the walls divide the grid into.
Given your booked trades and a counterparty's confirmations as (trade_id, isin, side, quantity, price), match them one to one where ISIN, side and quantity agree exactly and prices differ by at most a tolerance, maximizing the number of matches and listing the unmatched trades on each side.
Tell me about a time you found that new users were dropping off early and what you did to fix the experience.
Build a text editor that keeps a cursor and supports addText(s), deleteText(k) (backspace up to k characters, return how many were deleted), and cursorLeft(k) / cursorRight(k), each returning the last up to 10 characters to the left of the cursor.
A Messenger experiment raised the share of users who start a group video call from 0.5% to 0.6%. The PM's update says "20% lift in group calls" while an engineer says it is "only 0.1 points". How should the result be reported to leadership?
Design a disjoint set structure over n elements supporting union, find, the current number of components, undo of the most recent union, and rollback to a saved snapshot, with every operation in O(log n).
A terrain profile is given as column heights. V droplets of water fall one at a time at index K; each droplet moves left if it would eventually reach a lower level that way, otherwise right under the same rule, otherwise stays at K, and it settles at the lowest reachable point closest to K. Return the heights after all droplets settle.
Given n distinct feed slots labeled 1..n, return the kth permutation in lexicographic order (1-indexed) as a string, without generating the earlier permutations.
Given four equal-length integer arrays A, B, C and D of ranking signal adjustments, count the index tuples (i, j, k, l) with A[i] + B[j] + C[k] + D[l] equal to zero.
Describe a time you personally dug into a single customer's problem, beyond what your role required, and what you changed as a result.
Design the service that delivers OS updates to a heterogeneous fleet of streaming players and TVs, supporting staged percentages per model, automatic halts on bad health metrics, and devices that are often offline.
Get the full picture with our company interview guides.
Tell us what you were asked. Get 1 AI interview credit for each approved report.