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
Trucks drive an undirected road network between nodes with fixed drive times, but some nodes (terminals and handoff yards) can only be entered during listed time windows, and a truck that arrives early waits. Given a departure time, return the earliest time the truck can arrive at the destination, or -1 if impossible.
Instacart wants to test a new algorithm that batches more orders per shopper trip. Design the experiment, given that customers and shoppers in the same zone share one pool of supply.
Given a binary tree of comments, return node values level by level, alternating left-to-right on even levels and right-to-left on odd levels.
Two non-negative integers are stored as singly linked lists of decimal digits, most significant first. Return their product as a new linked list in the same format without converting either number to a built-in integer.
Given four cards with values 1 to 9, decide whether you can combine them using +, -, *, / and any parenthesization to get exactly 24. Division is real (not integer) division.
About 15 percent of daily Google queries have never been seen before, and keyword matching often misses relevant pages for them. Design a dense retrieval system that complements the inverted index for these long-tail queries.
Payment gateway webhooks for an order can arrive duplicated and out of order (for example CAPTURED before a late AUTHORIZED). Implement a handler that applies each event at most once and never moves an order backwards in its payment state machine.
Tell me about a time customer feedback data led you to recommend changing a decision your team had already made. How did you build the case?
Given a dense daily table of units sold per ASIN (asin, date, units), use pandas to flag days whose units deviate by more than three standard deviations from the mean of the previous 28 days for that ASIN, excluding the current day from its own baseline and skipping ASINs without enough history.
Anesthesia claims are billed as base units for the procedure plus time units (one per 15 minutes of anesthesia time). Given possibly overlapping or duplicated start/end time records for one case, compute total anesthesia minutes and billable units under a configurable payer rounding policy.
Aisles in a fulfillment center form a binary tree. A camera at a node covers that node, its parent and its children. Return the minimum number of cameras needed so every node is covered.
Facebook friend requests sent in India fell 30% on one day and recovered the next. How do you investigate a one-day dip, and is it worth the effort?
Generate every n-digit number with no leading zero in which every pair of adjacent digits differs by exactly k. Return them in ascending order.
For a homepage widget, you estimate click-through rates for thousands of product categories, many with only a few dozen impressions. Explain why raw rates overfit, and implement beta-binomial empirical Bayes shrinkage.
Given a packing list as a sequence of SKU strings, compress consecutive repeats into (sku, count) pairs, and write the matching decoder. Then handle the variant where the output must be a single string and SKUs themselves may contain digits.
Design the ML system that picks six products for each customer's weekly Amazon deals email, balancing relevance, deal quality and email fatigue.
Given a raw log line from an authorization service, replace every substring that is a valid payment card number (15-digit Amex numbers starting 34 or 37, or 16 to 19 digit numbers) with asterisks except the last four digits. Digit runs that fail the Luhn check, like order ids, must be left alone, and numbers may contain spaces or hyphens.
Tell me about a project you delivered that depended on several other teams. How did you keep it on track, and what did you do when a dependency slipped?
Write a client that sends accepted coding changes back to a customer's EHR API, which enforces a per-tenant rate limit and sometimes fails with retryable errors or times out after applying the change. The client must retry safely, never apply the same change twice, and respect each tenant's rate limit.
Given a time-ordered stream of UPI payments (timestamp, payer, amount in paise), return the indices of payments that push a payer over either a count limit or an amount limit within the trailing window of T seconds.
Get the full picture with our company interview guides.
Tell us what you were asked. Get 1 AI interview credit for each approved report.