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
A BST of distinct user IDs was serialized in preorder. Reconstruct the tree from that list alone in O(n) time.
The Messenger Android crash rate per session doubled after a release, yet DAU is unchanged. Should the team worry, and what would you measure?
A spam classifier with 90% sensitivity and 97% specificity flags 5% of a random sample of Facebook Groups posts. Estimate the true spam prevalence and explain how uncertainty in the classifier's error rates affects the estimate.
The cost of a contiguous burst of positive request weights is its sum multiplied by its length. Given the weights and a cap, count the non-empty bursts whose cost is strictly less than the cap.
Tell me about a time a system you owned misbehaved while it was being used in production by traders or other time-sensitive users. How did you decide what to do in the first few minutes, and what changed afterward?
A prospect asks you to prove that automated pre-bill review increases collected revenue per chart at their 40-clinic group. Design the measurement, including the unit of randomization, the metric, and how you would handle the fact that payments arrive weeks after submission.
You trade one unit of an asset with known daily prices, may hold at most one unit at a time, and pay a fixed fee on each completed sale. Return the maximum profit with unlimited trades.
Estimate how much money US viewers spend on virtual gifts in TikTok LIVE in a year, show your assumptions, and sanity-check the number from a second direction.
Given a videos DataFrame where hashtags is a list column (sometimes empty or null, with mixed case and repeats), return the top k hashtags per posting day by number of videos using them.
Design the Google Photos backup system that uploads new photos and videos from phones in the background, respecting battery, data plans and storage quota, and never uploading the same item twice even after reinstalling the app.
Multi-currency card spend needs a current FX rate for every authorization. Build a thread-safe TTL cache where a burst of misses for the same currency pair triggers only one upstream fetch, and stale rates are served briefly if the provider is down.
Design the caching strategy for Flipkart product detail pages so they stay fast when traffic jumps 10x or more during sale events, while keeping price, offers and stock fresh enough to avoid customer complaints.
Given n version ids and a list of sequences, each showing some versions in the order they were released, decide whether exactly one ordering of all n versions is consistent with every sequence, and return it if so.
Design how Instagram checkout handles buyer refund requests, merchant-issued refunds, and card network chargebacks, keeping buyers, merchants, and Meta's ledger consistent.
Design an ML system that mines fleet driving logs for rare or hard perception cases (for example unusual vulnerable road users or debris), produces high-quality 3D labels using offline models plus targeted human review, and feeds them back into training of the onboard detector.
Given a list of play events where each event is a title name, return the k most played titles with their counts, sorted by count descending and by title ascending when counts tie.
Given an unsorted list of advertiser bids (integers, duplicates allowed) and a target budget, return how many index pairs i < j have bids[i] + bids[j] equal to the budget.
Ad servers emit per-minute latency histograms with fixed bucket bounds instead of raw samples. Write Python that merges them into hourly histograms and estimates the p99 latency per hour from the merged buckets.
The Facebook Lite team proposes turning Data Saver on by default for users on 2G and slow 3G connections. A test shows a 6% drop in photos viewed but a 2% rise in daily sessions. Should it launch?
Given an order_items table, find the 10 product pairs that appear together in the most orders, and report each pair's lift so that pairs of merely popular products do not dominate.
Get the full picture with our company interview guides.
Tell us what you were asked. Get 1 AI interview credit for each approved report.