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
On a grid with blocked cells, a vehicle aligned on a horizontal or vertical axis can move one cell either way along its axis at cost 1 or switch axis in place at a fixed cost; find the minimum cost from start to goal.
Given possibly unsorted and duplicated GPS fixes (timestamp, latitude, longitude) for one trip, compute total distance in miles using haversine, discarding fixes that imply an impossible speed and ignoring jitter while parked.
Implement the server-side handling of an idempotency key on a create-VM endpoint so that client retries never launch duplicate GPU instances, including concurrent retries, key reuse with a different body, and transient backend failures.
Given a product's base price and a list of promotions, each a half-open time window with a promo price, return the merged timeline of effective prices over a horizon, where the effective price at any moment is the lowest of the base price and all active promotions.
Design the ML ranking pipeline that turns a Bing query into the final ten organic results from an index of billions of pages, within a latency budget of a few hundred milliseconds.
Write a function that takes a user-typed UPI virtual payment address, normalizes it, and either returns the canonical form or a clear rejection reason, using a fixed set of known PSP handles.
Packages on a conveyor must be loaded in order onto one truck per day, and a day's load cannot exceed the truck's capacity. Given package weights and a number of days D, return the smallest integer capacity that ships everything within D days.
Amazon has mostly implicit feedback (views, purchases, returns) rather than star ratings. Explain how weighted matrix factorization handles implicit data and walk through the alternating least squares update.
Your intent classifier for Alexa shopping requests always picks one of its known intents, even for utterances it was never trained on. Explain how you would detect out-of-scope requests and decide when to abstain.
You are given an iterator over catalog items that only supports next() and has_next(). Wrap it in a class that also supports peek(), returning the next item without consuming it.
A PM proposes giving every free learner a second streak freeze automatically instead of making them buy it with gems. Walk through how you would decide whether to ship it.
Zoho CRM email templates contain placeholders like ${Contact.First_Name}. Write a validator that returns the position and reason for every placeholder that is unclosed or whose field name is not a dotted identifier.
In a singly linked list of experiment arms, swap the kth node from the start with the kth node from the end by relinking nodes, not by swapping their values, and return the head.
Given a list of non-negative 31-bit serial numbers for Echo devices in a firmware rollout cohort, return the largest value of a XOR b over all pairs. Aim for better than the O(n^2) pairwise check.
A new WhatsApp spam classifier improves global AUC from 0.91 to 0.92, yet complaints rise in Indonesia and Brazil. Explain how an aggregate metric can improve while important slices regress, and how you would evaluate to catch it.
Given a list of item prices in cents and a gift card unit size m (for example 500 cents), count the pairs (i, j) with i < j whose combined price is an exact multiple of m.
Given events (user, timestamp, name) and an ordered list of funnel steps, count how many users reached each step, where steps must happen in order and all within a fixed window measured from the first step.
Pricing analysts write fare formulas such as `base + surge * (per_mile * miles - discount)`. Given a formula string and a dict of variable values, evaluate it with standard precedence, parentheses and unary minus, without using eval.
Design the system that renews tens of millions of Prime memberships monthly or yearly, charges the stored payment method, retries failures intelligently, and suspends benefits only when appropriate.
Design the system that ingests GPS pings from hundreds of thousands of delivery partners and streams each rider's position to the customers tracking their orders in near real time.
Get the full picture with our company interview guides.
Tell us what you were asked. Get 1 AI interview credit for each approved report.