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 engagement deltas for posts in feed order (possibly negative) and an integer k, pick a non-empty subsequence where consecutive picks are at most k positions apart, maximizing the total.
Design the ML system behind a personalized radio station in Apple Music that starts from a seed song or artist and keeps choosing the next track for each listener in real time.
Each engineer has a speed and an efficiency. Choose at most k engineers to maximize (sum of their speeds) times (minimum efficiency among them). Return the maximum value.
YouTube is testing a new home screen layout on smart TVs, where several family members often share one device and switch between accounts. Should you randomize by account, device, or household, and why?
Design Instagram's Collab feature where one creator invites another to co-author a post, the post appears on both profiles and in both sets of followers' feeds once accepted, and engagement is shared.
You must roll out n microservices where some depend on others being live first; in each wave you may deploy any number of services whose dependencies are already live. Return the minimum number of waves, or -1 if the dependencies form a cycle.
Given a Unix-style path like `/media/./img//2024/../thumbs/`, return its canonical absolute form by collapsing repeated slashes, removing `.` segments, and resolving `..` to the parent (never above root).
A robot vacuum starts at a free cell of a grid (0 free, 1 wall) facing north, east, south or west. It cleans its cell, then scans left turns for an uncleaned free neighbor and moves there; if none exists it backs up one cell keeping its heading, and stops if it cannot back up. Return the number of cells cleaned.
Design the networking and state synchronization service that lets several people in a Meta Quest mixed reality app see and move the same virtual objects with low latency and consistent ownership.
In a binary decision tree, a zigzag path starts at any node and moves to a child, alternating between left and right steps each time. Return the number of edges in the longest zigzag path.
Values are inserted one by one into an empty binary search tree. Given one insertion order (a permutation of 1 to n), count the other orderings that would produce an identical BST, modulo 10^9 + 7.
Self-attention is permutation invariant. Explain why transformers need positional information, compare sinusoidal, learned and rotary position embeddings, and discuss what matters when extending context length.
You are the product manager for the model portfolio tools that financial advisors use on Aladdin Wealth. With capacity for one major initiative next quarter, choose between automated tax-aware rebalancing, a client-facing proposal generator, and deeper risk analytics, and justify the decision.
During popular livestreams, YouTube live chat receives thousands of messages per minute including scam links, impersonation and repeated spam. Design a filter that decides within milliseconds whether to show, hold or hide each message.
On Facebook Dating, likes sent per user are flat but the share of likes that become mutual matches fell from 8% to 6.5% over three weeks. How would you diagnose it?
On a grid city map where 'C' marks an EV charging station, '#' a blocked block, and '.' an open block, return a grid giving each open block's walking distance (4-directional steps) to the nearest charger, or -1 if none is reachable.
A Google Lens product recognition model scores 90 percent top-1 accuracy on a 2,000 image test set collected from 300 users. Build a confidence interval for that accuracy and explain how clustering by user changes it.
Rotate an n x n grid of pixel values 90 degrees clockwise in place, as when correcting a thumbnail's orientation, using O(1) extra memory.
Design how Gmail stores email attachments so that the same file sent to thousands of recipients is stored once, while deletion, privacy, and per-user storage accounting still work correctly.
Meta logs ad impressions on the client and on the server, without a shared id. Match each client impression to at most one server impression for the same user and ad within 5 seconds, closest first, and report the unmatched rate on each side.
Get the full picture with our company interview guides.
Tell us what you were asked. Get 1 AI interview credit for each approved report.