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 reports table (one row per user report on a video, with policy category) and a moderation_actions table, compute for each policy category the median minutes from a video's first report to its first moderation action, plus the share of reported videos that were actioned.
Start two threads, one responsible for odd numbers and one for even numbers, so that together they output 1 through n strictly in order.
A new credit card underwriting model would approve some applicants the current model rejects. Estimate the default rate those newly approved applicants would have, given that we never observed outcomes for people we rejected.
Given an org chart as a map from each manager to their direct reports, the root (CEO), and two employee names, return the lowest manager who has both employees in their reporting chain (an employee counts as in their own chain), or None if either is absent.
Design the ledger behind a Microsoft account balance that is credited by gift cards and refunds and debited by game and app purchases on Xbox and Windows, so balances are always correct and every change is auditable.
Using merchant activation dates and succeeded charges with Stripe fee revenue, write SQL that produces, for each monthly activation cohort and each month since activation, the logo retention and net revenue retention relative to the cohort's first month.
Using a Messenger messages table, define a conversation as a message after at least six hours of thread silence, and write SQL for the daily share of conversations that get a reply from another participant within five minutes.
For a binary classifier such as a Microsoft Defender malicious-file detector that outputs a sigmoid probability, explain why we train with cross-entropy (log loss) instead of mean squared error, using the gradients to support your answer.
Describe a time you raised a user experience concern about a design owned by a different team, and how you got it addressed without stepping on their ownership.
Design how Pinterest accepts image uploads from web and mobile, stores originals durably, and generates the multiple resized and compressed variants needed across the masonry grid, closeup and email, while serving them through a CDN.
Given each interviewer's free intervals for a day, return every back-to-back block of a fixed length during which at least `need` interviewers are simultaneously free, so a panel or a pool of backups can be guaranteed.
Given sign-in records as (profile_id, device_id) pairs, treat two profiles as the same household if they used a common device, directly or through a chain of shared devices, and return the households as sorted lists of profiles, largest first.
A large city transit agency is evaluating contactless and mobile wallet payments. As the Google Wallet PM, how would you win the agency and drive rider adoption after launch?
Given the feature definitions on main and on a branch, each a map from feature name to its attributes (type, resolver, staleness and so on), report which features were added, removed, or changed, and for changed ones which attributes differ.
Sales needs to know how many ad impressions (avails) will be available next month for any combination of targeting filters such as geo, audience segment, content genre and daypart. How would you model and serve these forecasts, and how would you measure their accuracy?
Write a function that checks whether a card number string passes the Luhn checksum, allowing spaces and dashes as separators, and a helper that masks all but the last four digits for display.
Given a stream of request latencies and a window size k, output the median latency of the most recent k requests after each new request once the window is full.
You have human raters compare responses from model A and model B on the same prompts, choosing A, B, or tie. Explain how to compute a win rate, how to put a confidence interval on it, and when you would instead fit a Bradley-Terry model across many models.
Design the storage and query layer for a log analytics platform that ingests several petabytes of semi-structured machine data per day, keeps it searchable by time range and keyword for 90 days, and answers ad hoc search and aggregation queries across a cluster of indexers in seconds.
Derive the gradient of cross-entropy loss with respect to the logits of a softmax classifier, then implement the loss and gradient in a numerically stable way.
Get the full picture with our company interview guides.
Tell us what you were asked. Get 1 AI interview credit for each approved report.