Google

A recruiter chat, an online assessment for some early-career roles, a first round of coding and behavioral interviews, then a second round, now mostly in person, of coding (plus system design and leadership from L5). Hiring committee, then team matching with a hiring-manager call.

359 questions

  • Disagreements with a coworker, another team and a menteeBehavioralThree behavioral questions in one round, each answered with a real story: what happened, what you did and how it ended. 1. You and a coworker disagreed about the work. How did you…
    Last asked Oct 2026
  • URL router with single-segment wildcardsCodingBuild a small URL router. - A pattern and a path are split on / into segments. Empty segments are ignored, so /a/b/ is the same as /a/b, and / is the empty path. - A pattern…
    Last asked Oct 2026
  • Best value from unit-weight items with limited copiesCodingA bag holds at most capacity units of weight. There are n kinds of item; every copy of kind i weighs 1 and is worth valuesi, and there are countsi copies of it. Return the most…
    Last asked Oct 2026
  • Merge two config trees with per-node merge rulesCodingTwo configuration files have been parsed from YAML into trees of dicts, lists and plain values: a base and an overlay. Merge the overlay into the base. Each node can carry its own…
    Last asked Oct 2026
  • Behavioral round on company valuesBehavioralA behavioral round anchored on the company's published values: bring experiences covering conflict, feedback, mentorship, leading work and technical trade-offs. Reported on…
    Last asked Oct 2026
  • Median of several sorted arraysCodingYou get several integer arrays, each sorted in non-decreasing order. Return the median of all their values taken together. The interview started with exactly two arrays and then…
    Last asked Oct 2026
  • Reachability in a time-indexed train scheduleCodingGiven train departures and arrivals with timestamps, decide whether a destination is reachable from a start station without time travel. Reported on 1point3acres' Glean bank;…
    Last asked Oct 2026
  • A leader who shaped you and how you used the lessonBehavioralDescribe a manager or tech leader who had a strong, lasting effect on you. Say what they actually did in specific moments, not just what they were like, and how you later used…
    Last asked Oct 2026
  • How do you prioritize when you have too much work?BehavioralExplain how you decide what comes first when there is more work than time, and back it up with a real example. A convincing answer names what you dropped or pushed back and why…
    Last asked Oct 2026
  • What do you do when two people disagree?BehavioralDescribe how you handle a disagreement between two people and support it with a concrete example from your own work. Show how you found what each side really cared about, how the…
    Last asked Oct 2026
  • Number of islands as land is addedCodingA grid starts as all water. Positions are turned into land one at a time; after each addition, return the current number of islands (land cells connected up, down, left or right)…
    Last asked Oct 2026
  • Which area would you improve to do better work here?BehavioralIf you could get better at one thing right now, what would it be, and how would that improvement help your future work at Google? Pick a real gap rather than a strength in…
    Last asked Oct 2026
  • Maximum overlap of closed intervalsCodingGiven a list of closed intervals start, end (both endpoints included), return the largest number of intervals that contain one point on the number line. Two intervals that only…
    Last asked Sep 2026
  • Group dependent tasks into parallel levelsCodingYou run a build system. Each task has a unique, non-empty lowercase name. Some tasks depend on others: a dependency before, after means before must finish before after can start…
    Last asked Sep 2026
  • Binary search tree keys within a rangeCodingGiven a binary search tree (as a level-order list with nulls for missing children) and an inclusive range low, high, return every key in the range in ascending order. Skip the…
    Last asked Sep 2026
  • Customer support dispatcher for agents who take breaksCodingBuild the core of a dispatcher for a customer support team. Customers get in touch and wait. Human agents sign in, serve one request after another, and sometimes leave, even in…
    Last asked Sep 2026
  • Design a CI/CD systemSystem designOn every commit, build and test the code on a fleet of workers, then roll it out to production safely, with logs, retries and rollbacks.
    Last asked Sep 2026
  • Find timed-out RPC calls from start and end logsCodingA service writes one log record when a remote procedure call starts and another when it ends, and the log is in time order. Given the log and a timeout, report every call that ran…
    Last asked Sep 2026
  • Lowest common manager in an org chartCodingA company's reporting structure is a rooted tree. Each person is an Employee with a unique name and a list reports of the people who report to them directly. The root is the CEO…
    Last asked Sep 2026
  • Next greater element in a circular arrayCodingYou get an integer array that wraps around: after the last element, scanning continues from the first. For every index, return the first value strictly greater than its own that…
    Last asked Sep 2026
  • Extensible spreadsheet range aggregatesCodingDesign a spreadsheet API with getsum, getmax and getmin over a range of cells, where a cell holds either a value or a formula. Show how someone adds a new aggregate later without…
    Last asked Sep 2026
  • Largest rectangle from a point set, any orientationCodingYou get distinct points with integer coordinates. Choose four of them that are the corners of a rectangle, where the sides do not have to be parallel to the axes. Return the…
    Last asked Sep 2026
  • Weighted job schedulingCodingEach job has a start time, an end time and a profit. Choose jobs that do not overlap to make the most profit. Sort jobs by end time; for each job, binary search for the last job…
    Last asked Sep 2026
  • Earliest time everyone is connectedCodingA time-sorted log has lines such as t3 Bob shared-ride-with Charlie. Sharing a ride connects two riders, and connection carries through other riders. Given the log and the list of…
    Last asked Sep 2026
  • Count grid paths through ordered checkpointsCodingAn n x m grid. A path starts at the bottom-left cell and ends at the bottom-right cell. Each move goes one column to the right and either one row up, the same row, or one row…
    Last asked Sep 2026
  • Delete leaves with a target value, repeatedlyCodingGiven a binary tree and a target value, delete every leaf that holds the target. If that turns its parent into a leaf holding the target, delete the parent as well, and keep going…
    Last asked Sep 2026
  • ML fundamentals deep dive for ML rolesML designAfter a short walk through your resume, expect fast questions on machine learning basics, usually centred on your own area (language models, vision, recommendations). For each…
    Last asked Sep 2026
  • Rate-limited event loggerCodingBuild a logger that rate-limits repeated events in a stream. Each event has a string name and an integer timestamp in seconds. Timestamps arrive in non-decreasing order, and…
    Last asked Sep 2026
  • Project deep dive: present a project you ledBehavioralPresent a project you led in about 20 minutes: context, your role, the architecture, three hard trade-offs, metrics, cost and return, and what you would change. Then take 25…
    Last asked Sep 2026
  • First missing positiveCodingGiven an unsorted list of integers that may include negatives, zeros, duplicates and values much larger than the list's length, return the smallest positive integer that does not…
    Last asked Sep 2026
  • Most active user by distinct contacts, then top KCodingUsers send each other messages, and a message between A and B counts as contact for both of them. Build a class with: - register(a, b): record a message between a and b. -…
    Last asked Sep 2026
  • How would you verify a smile detector in a photo app?ML designYou are on the Google Photos team and your feature detects smiling faces in photos. How would you check that the detection is correct? Cover what counts as a smile and who decides…
    Last asked Sep 2026
  • Tell me about a time you compromisedBehavioralTell me about a time you had to compromise. After the story, expect probes: how you will act differently because of that experience, whether you are satisfied with how it turned…
    Last asked Sep 2026
  • Jump game: can you reach the last index?CodingYou get a list of non-negative integers and start at index 0. numsi is the longest jump you may make from index i: you can move forward to any index up to i + numsi. Return…
    Last asked Sep 2026
  • Expand placeholders from a variable storeCodingImplement a small store of variables, like the export NAME="Tom" lines of a shell startup file. Any string can refer to a variable as %NAME%; expanding the string replaces each…
    Last asked Sep 2026
  • Work style and situational judgment assessmentBehavioralSome online assessments include a part with no code at all. You read short workplace scenarios and rate or rank possible responses, then choose between pairs of statements about…
    Last asked Sep 2026
  • Fewest nodes on a path when one vertex may be brokenCodingFind the path between two nodes of a graph that passes through the fewest nodes, and return that count. One vertex may be broken and unusable: handle both the case where it…
    Last asked Sep 2026
  • Predict the most frequent next word in constant timeCodingFrom a body of text, build a predictor that, given a word, returns the word that most often came right after it. Each prediction must take O(1) time. Discuss how you keep that…
    Last asked Sep 2026
  • Sliding window average excluding the k largestCodingImplement windowedaverages(nums, windowsize, k). Slide a window of windowsize consecutive elements across the integer array nums, from left to right. For each full window, drop…
    Last asked Sep 2026
  • Bookshelf with book CRUD and a stable bookmarkCodingDesign a bookshelf that supports adding, reading, updating and removing books, plus a bookmark that keeps pointing at the right book while books are added or removed around it.
    Last asked Aug 2026
  • Arrange crops into connected regions of a gardenCodingA rectangular garden has N rows and M columns, and there are K crop types. Crop i must take exactly counti cells, and the counts add up to N M. Return any planting that uses every…
    Last asked Aug 2026
  • Can two ordered sequences be merged into one order?CodingYou get two arrays of integer labels. Each array sets ordering rules: a label must come before every label that follows it in the same array. Decide whether one ordering exists…
    Last asked Aug 2026
  • Longest straight run of one color in a gridCodingGiven a grid of colors such as R, G and B, return the length of the longest line of cells with the same color, running horizontally, vertically or diagonally.
    Last asked Aug 2026
  • Dependency-safe deletion orderCodingEntities have parent-child relationships, and the relationships limit what can be deleted when. Model the relationships as a graph and return an order that deletes everything…
    Last asked Aug 2026
  • Design a distributed web crawlerSystem designCrawl billions of web pages politely and repeatedly, deduplicating URLs and content, to feed a search index or a training-data pipeline.
    Last asked Aug 2026
  • Merge two sorted interval listsCodingImplement mergetwointervallists(a, b). Each argument is a list of intervals start, end with integer endpoints and start <= end. Each list is sorted by start, and no two intervals…
    Last asked Aug 2026
  • Fewest rental cars for a set of reservationsCodingEach rental reservation has a start time and an end time. Find the fewest cars that can serve every reservation, and assign each reservation to a car. Follow-ups from other…
    Last asked Aug 2026
  • Detect and prevent reward hackingML designExplain reward hacking when a language model is trained with reinforcement learning: what it looks like, how you would detect it, and what you would change in the reward, the data…
    Last asked Aug 2026
  • Importance sampling in LLM trainingML designExplain importance sampling: what it is and why it works. Then explain where it is used when training large language models and why it is used there. Expect to go beyond the…
    Last asked Aug 2026
  • KL divergence in language modelsML designDefine KL divergence and explain what it measures. Then explain where it is used with large language models and why, for example as a penalty that keeps a fine-tuned model close…
    Last asked Aug 2026
  • Pipeline parallelism in GRPO trainingML designExplain pipeline parallelism and how it applies when a language model is trained with GRPO: how the model is split into stages across devices, how micro-batches keep the stages…
    Last asked Aug 2026
  • Reusable locker allocation systemCodingBuild a system that hands out lockers and takes them back so they can be used again: assign a free locker on request, release it later, and keep both operations fast as the number…
    Last asked Aug 2026
  • Reward-model RLHF versus direct preference optimizationML designWalk through a classic RLHF pipeline: supervised fine-tuning, a reward model trained on preference pairs, then policy optimization (PPO) with a KL penalty to the reference model…
    Last asked Aug 2026
  • VAEs: the ELBO, the KL term and reparameterizationML designDefine a variational autoencoder and its evidence lower bound (ELBO). Why does the objective include a KL divergence term, and what does it do? Explain the reparameterization…
    Last asked Aug 2026
  • What perplexity tells you about a language modelML designDefine perplexity and explain how to read it: what a lower or higher number means, how it relates to cross-entropy, how it is used for today's large language models, and where it…
    Last asked Aug 2026
  • Insert plus, times and parentheses to reach a targetCodingYou are given an equation whose left side is a sequence of non-negative integers with no operators between them, and whose right side is a target. For example: 2 3 4 = 20. Insert…
    Last asked Aug 2026
  • Highway toll checkpoints from plate logsCodingA highway has numbered toll checkpoints. Each checkpoint's name contains its position as a number, for example "A1" is at position 1 and "CP12" is at position 12. Ignore every…
    Last asked Aug 2026
  • Design a music recommender driven by an LLM agentAI systemDesign a music recommendation product in which an LLM agent talks with the listener and suggests songs or playlists. Cover how the agent reaches the listener's history and the…
    Last asked Aug 2026
  • Design permission-aware enterprise searchAI systemDesign search across every app a company uses (Drive, Confluence, Slack, Jira, GitHub, email and more) from one search box, plus an assistant that answers from the results. Nobody…
    Last asked Aug 2026
  • Count simple paths whose labels match a prefixCodingEvery node of a graph carries a label. Count the simple paths (paths that never repeat a node) whose sequence of labels matches a given prefix string. Explain how you prune the…
    Last asked Aug 2026
  • Check a new interval against existing ones for conflictsCodingGiven a set of existing intervals, decide whether a new interval overlaps any of them. Then discuss answering many such checks quickly as intervals keep being added, for example…
    Last asked Aug 2026
  • Nested list weight sum, parsed from a stringCodingA nested list holds integers and other lists. Return the sum of every integer multiplied by its depth, where the outermost list is depth 1. One version hands you the nested list…
    Last asked Aug 2026
  • Working with a difficult colleagueBehavioralTell me about a time you had to work closely with a colleague who was hard to work with. What made it hard, what you did, and how the work and the relationship turned out. One…
    Last asked Aug 2026
  • Leading a project through ambiguous requirementsBehavioralTell me about a project you led when the requirements were unclear. How did you decide what to build first, who did you talk to, how did you handle changes along the way, and how…
    Last asked Aug 2026
  • Longest equal length for cutting wood into K piecesCodingYou get pieces of wood of different lengths. Cut them into at least K pieces that all have the same length; leftover bits may be thrown away. Return the largest length that works…
    Last asked Aug 2026
  • Responding to difficult feedbackBehavioralTell me about a time you got feedback that was hard to hear. How did you react in the moment, what did you do with it, and what changed afterwards?
    Last asked Aug 2026
  • Lazy tee iteratorCodingImplement tee in Python: from one source iterator, create n independent iterators that each yield the full sequence. Pull from the source only when some copy needs the next item…
    Last asked Aug 2026
  • Players whose rank is fixed by game resultsCodingThere are n players, numbered 0 to n - 1, and a list of game results where a pair (u, v) means player u beat player v. Assume the results come from one strict ranking, so there…
    Last asked Aug 2026
  • Design a token-based rate limiter for AI agentsSystem designAI agents call paid services, and each call spends billing tokens. Design a limiter that caps how many tokens each agent or customer can spend over time, enforces the cap across…
    Last asked Aug 2026
  • Count clusters of 2D points within a radiusCodingTwo points belong to the same cluster when they are within a given distance of each other, and clusters chain through shared neighbors. Given the points and the distance, count…
    Last asked Jul 2026
  • Count visible people in a lineCodingPeople stand in a line and heightsi is the height of the person at position i. Two people can see each other when nobody standing between them is taller than both of them. First…
    Last asked Jul 2026
  • Count how many rectangles cover each grid cellCodingRectangles are laid on a grid, each one an update that covers a block of cells. Return, for every cell, how many rectangles cover it, without walking every cell of every…
    Last asked Jul 2026
  • Schedule tasks with cooldownsCodingTasks of several types run one per time unit, and two tasks of the same type must be separated by a cooldown. Arrange the tasks so the rule holds and the total time (idle slots…
    Last asked Jul 2026
  • Tic-tac-toe with K playersCodingImplement tic-tac-toe for k players on an n x n board. Players take turns placing their marks. However large the board is, a player wins as soon as they have three of their marks…
    Last asked Jul 2026
  • Design a personalized weekly deals serviceSystem designEvery week each user gets a set of deals picked for them. Design how deals are collected, matched to each user, stored and delivered, and how the weekly run stays on time as users…
    Last asked Jul 2026
  • Design a scalable, safe agentic systemAI systemDesign an agent system and talk through its problems with the interviewer: how it extends to more tools and tasks, how you keep its actions safe, and what you do when an agent…
    Last asked Jul 2026
  • Fewest road reversals in a directed networkCodingA road network has one-way roads. Travelling a road against its direction counts as a violation. Find a route between two given cities with as few violations as possible.
    Last asked Jul 2026
  • Monotone increasing digitsCoding1. Check whether a number's digits never decrease from left to right. 2. Given n, return the largest number no greater than n whose digits never decrease.
    Last asked Jul 2026
  • Trie with insert, search and prefix lookupCodingBuild a trie over a dictionary of words. Support inserting a word, checking whether an exact word is present, and returning every word that starts with a typed prefix, as an…
    Last asked Jul 2026
  • Build your own CompletableFutureCodingImplement a small version of CompletableFuture: a result that some thread completes later, that other threads can wait on, and that can be chained with callbacks. Then use it to…
    Last asked Jun 2026
  • Days when the whole team is freeCodingA team is planning an offsite over a window of numdays days, numbered from 1 to numdays. Each team member has entered busy blocks as triples (personid, startday, endday). Both…
    Last asked Jun 2026
  • Deterministic task execution orderCodingGiven tasks and their dependencies, return an order to run them that respects every dependency and comes out the same every time for the same input, by a fixed rule for breaking…
    Last asked Jun 2026
  • LLM foundations: architecture, adaptation and steeringML designA broad conversation on large language models: how the architecture works, the ways to adapt a model to a task (full fine-tuning, parameter-efficient methods, prompting), and the…
    Last asked Jun 2026
  • Most frequent IP addresses in a file too big for memoryCodingA log file of IP addresses is far larger than memory. Find the most frequent address, then the top K. Explain how you split the work into pieces that fit in memory, count each…
    Last asked Jun 2026
  • Every ordered sum of 1s and 2s that makes nCodingGiven n, list every ordered sequence of 1s and 2s that adds up to n (so 1+2 and 2+1 are different), and say how many there are.
    Last asked Jun 2026
  • Find a pattern across the leaf text of a binary treeCodingEach leaf of a binary tree holds a piece of text. Read from left to right, the leaves spell one long string. Decide whether a given pattern appears in that string, including when…
    Last asked Jun 2026
  • Match tagged problems to skilled programmers at scaleSystem designProblems carry tags and programmers have skills. Design a service that matches each new problem to programmers who are good at its tags, at large scale. Cover the data model, the…
    Last asked Jun 2026
  • Greedy longest-match tokenizerCodingImplement a greedy longest-match tokenizer. You are given a string text and a list dictionary. Each entry has the form "<key:<id". key is a non-empty token string and id is its…
    Last asked Jun 2026
  • Design a video generation service on a scarce GPU poolAI systemUsers submit text-to-video requests that each need minutes of GPU time, and the GPU pool is limited and changes size. Design the request flow, scheduling and workers, how users…
    Last asked Jun 2026
  • Threshold infection spread on a gridCodingA lab tracks a disease across a rectangular field of cells. You are given an m x n grid where 0 is a healthy cell and 1 is an infected cell, and an integer threshold. Each day…
    Last asked Jun 2026
  • Longest path of equal-valued tree nodesCodingGiven a binary tree, return the length of the longest path in which every node has the same value. The path may pass through any node and need not include the root; agree with the…
    Last asked Jun 2026
  • Evaluate nested add and sub expressionsCodingImplement evaluate(expression: str) - int, which evaluates a string written in a small function-call language. An expression is either: - an integer literal, possibly negative…
    Last asked Jun 2026
  • Boolean expression tree with leaf flipsCodingA tree's leaves hold true or false and its inner nodes are boolean operators. Evaluate the tree, then find the fewest leaf flips that make the root come out to a wanted value.
    Last asked Jun 2026
  • Stream of points: remove any pair within a distanceCodingPoints arrive one at a time. When a new point is within a given distance of a point already stored, remove that pair; otherwise store the new point. Keep each step fast as the…
    Last asked Jun 2026
  • Employee shift timeline tableCodingEach shift is given as name, start, end, with integer times and start <= end. A shift covers the half-open interval start, end). One employee may have several shifts, and they may…
    Last asked Jun 2026
  • Which interval contains a number?CodingBuild a class with addNonOverlappingInterval(start, end) and a query that says whether a number falls inside a stored interval (and which one). Discuss three versions: a linear…
    Last asked Jun 2026
  • Build a weighted binary tree from character countsCodingGiven a string s of letters ('A'-'Z', 'a'-'z'; case matters), build a binary tree that summarizes how often each character appears. Each node has three fields: ch, count, and two…
    Last asked Jun 2026
  • Connect your research to the team's workBehavioralFor a research scientist role: walk through your research experience and connect it to the team's work and goals. Explain what you would bring, where your experience falls short…
    Last asked May 2026
  • Design a quota serviceSystem designTrack and enforce how much of each resource (API calls, storage, compute) every tenant may use, with fast checks and limits that stay accurate across regions.
    Last asked May 2026
  • Design a security monitoring frameworkSystem designDesign a framework that collects security signals such as logs and events from many systems, detects suspicious activity, raises alerts and supports investigations. Cover…
    Last asked May 2026
  • Consolidate on-call rotation segmentsCodingAn on-call schedule is a list of segments, each naming a person and a start and end time. Merge the segments that belong to the same person and touch or overlap, and return the…
    Last asked May 2026
  • Merge two named treesCodingEach tree node is a dictionary with a name, an integer value and an ordered list of children. Given two such trees t1 and t2, build a new merged tree that follows t1's nodes and…
    Last asked May 2026
  • Flower placement and directory deletionCodingTwo problems in one round: 1. A row of plots has some flowers planted already, and no two flowers may be next to each other. Decide whether n more flowers can be planted. 2. Given…
    Last asked May 2026
  • Game of Life, updated in placeCodingEach cell of a grid is alive or dead, and all cells update together from the states of their eight neighbors, as in Conway's Game of Life. Compute the next state in place, without…
    Last asked May 2026
  • Turnstile crossing timesCodingPeople arrive at a single turnstile at given times, each wanting to enter or to exit, and one person passes per second. When people going both ways are waiting, a priority rule…
    Last asked May 2026
  • Design LeetCodeSystem designUsers solve coding problems in the browser; run their submissions safely against hidden tests, return verdicts quickly, and support live contests with leaderboards.
    Last asked May 2026
  • Does a word exist as a path in a graph?CodingEvery node of a graph holds a letter. Decide whether a word can be spelled by walking along edges, one letter per node. Agree on whether a node may be used twice, and give the…
    Last asked May 2026
  • Checksums, feature rollouts and dependency debuggingCodingAn online assessment in which some tasks allow an AI assistant. Reported tasks: compute checksums over input data, evaluate feature-rollout rules to decide which users get a…
    Last asked Apr 2026
  • Longest consecutive sequence path in a binary treeCodingReturn the length of the longest parent-to-child path in a binary tree in which each value is exactly one more than the value before it. Follow-up: the path may go in any…
    Last asked Apr 2026
  • Top K frequent elementsCodingGiven an integer array and k, return the k values that occur most often, in any order; ties at the cutoff may go either way. One version asks for the most frequent request IDs in…
    Last asked Apr 2026
  • Longest water-flow path with momentumCodingYou get an m x n matrix of heights. Water starts at any cell and moves to a neighboring cell up, down, left or right. Whether it may move on depends on the heights and on the…
    Last asked Apr 2026
  • Design calendar event conflict handlingSystem designIn a calendar service, design how conflicts between events are found and handled: overlapping events for the same person or room, two bookings made at the same moment, and…
    Last asked Apr 2026
  • Blind maze escape: one command sequence for every startCodingA robot is somewhere in a grid maze of walls (), open cells (.) and an exit (E), but you do not know which open cell it starts on. It obeys the commands U, D, L and R, each moving…
    Last asked Apr 2026
  • Count ways to spell a word with element symbolsCodingGiven the symbols of the chemical elements and a word, count the ways to write the word as a sequence of element symbols, ignoring case. For example, "Physics" splits as…
    Last asked Apr 2026
  • Snake case to camel case, then across a whole repositoryCoding1. Convert a valid snakecase name (no leading, trailing or doubled underscores) to lowerCamelCase, so foobar becomes fooBar. 2. An open discussion: a huge repository names its…
    Last asked Apr 2026
  • Count islands with diagonal connectivityCodingCount the islands in a grid of land and water where land cells are joined in all eight directions, diagonals included.
    Last asked Apr 2026
  • Design an embeddable streaming chat interfaceAI systemFor a frontend role: design the interface for a chat agent that other products can embed. Cover the component's API, streaming the agent's replies as they are generated, how…
    Last asked Apr 2026
  • Render more than 100 million points on a mapSystem designFor a frontend role: design a web map that shows more than a hundred million data points. Cover what the server sends at each zoom level (tiles, clustering, aggregation), how the…
    Last asked Apr 2026
  • Why an experimental technology team?BehavioralWhy do you want to join an experimental, moonshot-style technology group, and how do you fit its culture? The report names Google X. Give concrete reasons tied to your past work…
    Last asked Apr 2026
  • Process login logs split across shardsCodingLogin records are spread across several shards. Combine them to answer questions about users' logins, merging the shards correctly and efficiently, and explain how your approach…
    Last asked Apr 2026
  • Maximum sum of a subarray whose ends differ by kCodingGiven an integer array and k, a subarray is good when its first and last elements differ by exactly k. Return the largest sum of a good subarray, or 0 if there is none.
    Last asked Apr 2026
  • Remove one link and split a gold chain evenlyCodingAn array describes a gold chain; each number is the weight of one link. You must remove one link, join the chain back together, and then cut it into two pieces of equal weight for…
    Last asked Apr 2026
  • Find the shortest queue with few callsCodingYou can learn the length of each of several queues only through a call that is expensive. Find the shortest queue while making as few calls as you can, and explain the trade-off…
    Last asked Apr 2026
  • Detonate the most bombs in a chain reactionCodingEach bomb has a position and a blast radius. Setting one off detonates every bomb within its radius, and those set off others in turn. Return the largest number of bombs that can…
    Last asked Apr 2026
  • Can one board be turned into another by moving pieces?CodingA board is a string of R, L and empty cells. R pieces can only move right and L pieces only left, one empty cell at a time, and no piece can jump over another. Decide whether a…
    Last asked Apr 2026
  • Cold start in ranking systemsML designHow do you rank new items or serve new users that have no interaction history? Discuss content features, exploration, priors and boosting, how to move from cold to warm signals…
    Last asked Mar 2026
  • Substring search and weighted random samplingCodingTwo problems for a machine learning engineer screen: 1. Find where a pattern occurs in a text, and discuss doing better than checking every position. 2. Pick an item at random…
    Last asked Mar 2026
  • Palindrome number and merge intervalsCodingTwo short problems: 1. Decide whether an integer reads the same forwards and backwards. 2. Merge a list of possibly overlapping ranges into the fewest non-overlapping ranges.
    Last asked Mar 2026
  • CPU microarchitecture and simulator designCodingFor a CPU architect role: read and reason about assembly code; explain microarchitecture parts such as branch predictors, the MOESI coherence protocol, caches and MSHRs, VIPT…
    Last asked Mar 2026
  • Russian doll envelopesCodingEach envelope has a width and a height. One fits inside another when both its width and height are strictly smaller. Return the largest number of envelopes you can nest one inside…
    Last asked Mar 2026
  • Is every 3+ letter piece of a string a dictionary word?Coding1. Given a string and a dictionary, return true when every piece of the string of length 3 or more is a valid word. (The report says subsequences; confirm with the interviewer…
    Last asked Mar 2026
  • Is a 14-tile mahjong hand a winning hand?CodingGiven 14 mahjong tiles, decide whether they form a winning hand: four sets, each three identical tiles or three consecutive tiles of the same suit, plus one pair.
    Last asked Mar 2026
  • Design a replay system for publish-subscribeSystem designPublishers send messages to subscribers through a pub-sub system. Design a replay feature that lets a subscriber receive past messages again from a chosen point. Cover how…
    Last asked Mar 2026
  • Design an AI agent rollout for a global enterpriseAI systemA forward-deployed engineering design round. A large global company wants to adopt AI agents across its business. Design the agent and how it gets rolled out: which work it takes…
    Last asked Mar 2026
  • Two teams working on the same projectBehavioralWhat do you do when you find out two teams are working on the same project? Explain how you would raise it, who decides, and how you keep both teams' work from going to waste.
    Last asked Mar 2026
  • Probability of landing in a range on a dice walkCodingYou start at position 0 on an endless line. Each turn you roll a die with faces 1 to K and move forward that many steps. You win if you finish inside the range mn, mx, and lose…
    Last asked Mar 2026
  • Restaurant waitlist managerCodingBuild a waitlist for a restaurant: parties join with their size, may leave before being seated, and when a table frees up you seat the party that should get it. Keep each…
    Last asked Mar 2026
  • Ads retrieval service using a heapCodingBuild a service that returns the best ads for a request, ranked by score, using a heap. Support adding and removing ads, and discuss the cost of each operation.
    Last asked Mar 2026
  • Busiest meeting room after simulated bookingsCodingSimulate booking meetings into a fixed set of rooms and return the room that held the most meetings. Agree on the rules first: which free room a meeting takes, and what happens to…
    Last asked Mar 2026
  • Top K largest distinct valuesCodingGiven an array that may contain repeats, return the k largest distinct values.
    Last asked Mar 2026
  • Apply range overwrite queriesCodingYou get an array and a list of queries (start, end, k), each setting every element between start and end to k. Return the array after all queries. The interviewer wanted the…
    Last asked Feb 2026
  • Largest subset of two-digit numbers sharing a digitCodingAn array holds only two-digit integers (10 to 99). Choose as many elements as you can such that every chosen number contains at least one common digit. Return the count; for 52…
    Last asked Feb 2026
  • Editable sequence with a markerCodingDesign a sequence of elements with a marker on one of them. Support adding or removing a run of elements at a position, moving a run from one position to another, and setting a…
    Last asked Feb 2026
  • LRU cacheCodingBuild a key-value cache with a fixed capacity that evicts the least recently used entry when it is full. get(key) returns the value or a miss, put(key, value) inserts or updates…
    Last asked Feb 2026
  • Assign dorm rooms by student preferenceOO designYou get student IDs and room IDs. Each student prefers a two-person room or a four-person room. Design a system that assigns students to rooms according to their preferences. The…
    Last asked Feb 2026
  • Manager and peer relationships with is_manager queriesCodingImplement three functions: - manager(a, b): a is the manager of b. - peer(a, b): a and b have the same manager. - ismanager(a, b): return whether a is a manager of b. Decide how…
    Last asked Feb 2026
  • Most coins collected by tokens that jump three cellsCodingA one-player board game: a string of N positions, each empty (.), holding one of the player's tokens (T) or holding a coin (C). The player may have several tokens, and a token…
    Last asked Feb 2026
  • Minimum servers for daily jobs that wrap past midnightCodingEach job runs every day over a time window on a 24-hour clock, and a window may wrap past midnight (start later than end). A server runs one job at a time. Return the fewest…
    Last asked Feb 2026
  • Next-word predictor from bigram countsCodingYou get training sentences as lists of words, for example "a", "b", "c", "a", "s", "d". 1. Count, for every word, which words follow it and how often. 2. predict(word) returns the…
    Last asked Feb 2026
  • Cheapest common ancestor in a treeCodingNodes of a tree carry costs. Given a set of nodes, find the common ancestor of all of them that has the lowest cost.
    Last asked Feb 2026
  • Decaying power levels across a graphCodingSome nodes of a graph are power sources with a starting level, and power weakens as it travels along edges. Compute the power level that reaches every node (when several sources…
    Last asked Feb 2026
  • Fewest boards to cover every hole in a roofCodingA roof has holes at given positions along a line, and boards of a fixed length can be laid over it. Return the fewest boards needed so every hole is covered. Sort the holes and…
    Last asked Feb 2026
  • Fewest lines to wrap a sentenceCodingGiven a non-empty string text and a positive integer maxwidth, return the fewest lines needed to lay out all the words of text. Implement: Rules: - A word is a run of non-space…
    Last asked Feb 2026
  • LLM fine-tuning and generative modelsML designExplain how large language models are fine-tuned: supervised fine-tuning, parameter-efficient methods such as LoRA, and preference tuning, with the trade-offs of each. Then…
    Last asked Feb 2026
  • Shortest relationship path between two peopleCodingPeople are linked by relationships (a graph where each edge is a direct relationship). Given two people, return the shortest chain of relationships that connects them, or say that…
    Last asked Feb 2026
  • Top K frequent elements and K closest pointsCodingTwo warm-up style problems that the interviewer combined into one round: 1. Return the k points closest to the origin. 2. Return the k most frequent values in a list. Then combine…
    Last asked Feb 2026
  • Grid path that keeps its highest cell as low as possibleCodingEach cell of an m x n grid holds a height. Find a path from the top-left to the bottom-right cell, moving up, down, left or right, whose highest cell is as low as possible, and…
    Last asked Feb 2026
  • K-th greatest value in every growing prefixCodingYou are given arr, a permutation of the integers 1 to n (each value appears exactly once), and an integer k with 1 <= k <= n. Read arr from left to right. After reading each…
    Last asked Feb 2026
  • Check that a parent array forms a valid treeCodingYou get an array where parenti is the parent of node i (the root has no parent, for example -1). Return whether the array describes one valid tree: exactly one root, no cycles…
    Last asked Feb 2026
  • Crack a 4-digit code from exact-match countsCodingA server holds a secret 4-character code. Each character is a digit from '0' to '9'. Digits may repeat, and the code may start with zeros. You can only learn about the code…
    Last asked Feb 2026
  • Decode a string with nested repeat countsCodingAn encoded string uses k... to mean the bracketed part repeated k times, and brackets may nest, for example 3a2c decodes to accaccacc. Return the decoded string. Use a stack or…
    Last asked Feb 2026
  • Design app recommendations for an app storeML designRecommend apps to each user on an app store's home page and in its search results. Cover candidate generation and ranking, the signals you would use (installs, uninstalls, usage…
    Last asked Feb 2026
  • Waitlist with top-K and bottom-K queriesCodingBuild a waitlist. People join with a priority (or a join time), can leave, and the system answers two queries at any moment: the top k entries and the bottom k entries. Choose…
    Last asked Feb 2026
  • Sum of all consecutive-step subarraysCodingCall a subarray consecutive when each element is exactly one more than the one before it, or each is exactly one less (a single element counts). Return the sum of the values of…
    Last asked Feb 2026
  • Matrix transforms and what eigenvalues meanCodingImplement basic matrix operations used to transform points (multiply, rotate, scale, compose transforms). Then explain eigenvalues and eigenvectors: what they say about a…
    Last asked Feb 2026
  • Design layer document with undo, redo and batchesCodingYou are building the core of a design tool. A document holds layers. Each layer has a unique integer id and a set of string properties, such as color, shape or size. A layer does…
    Last asked Feb 2026
  • Host several websites on one server with one public IPSystem designYou have one server and one public IP address, and three small businesses each want their own website at their own domain. Explain how to serve all three from that machine, then…
    Last asked Feb 2026
  • What happens when you run lsCodingWalk through what happens, from the shell down to the kernel, when you type ls in a terminal and press Enter: how the shell finds and starts the program, the system calls…
    Last asked Feb 2026
  • Present and defend your researchBehavioralA research-focused conversation with no coding. Introduce your research (or dissertation) briefly, then answer detailed follow-up questions on your methods and results: what you…
    Last asked Jan 2026
  • Order feature activations by their dependenciesCodingFeatures must be turned on in an order that respects their dependencies (a feature can only be activated after the features it depends on). Given the features and dependencies…
    Last asked Jan 2026
  • Decide whether two people in a family tree are relatedCodingYou get a family tree as parent and child links. Given two people in it, decide whether they are related through the tree. Agree on what "related" means with the interviewer (for…
    Last asked Jan 2026
  • Design a payment fraud detection systemML designScore every card payment for fraud within tens of milliseconds, balancing blocked fraud against declined good customers, with labels that arrive weeks later.
    Last asked Jan 2026
  • Design a street-level imagery ingestion and storage systemSystem designVehicles capture large volumes of street-level photos. Design how the images are uploaded, processed, stored and served: ingestion from the field, metadata such as location and…
    Last asked Jan 2026
  • Sum of distances from every node in a treeCodingGiven an undirected tree with n nodes, return for every node the sum of its distances to all other nodes. A BFS from every node is too slow; compute it in linear time with two…
    Last asked Jan 2026
  • Best-matching binary pattern with wildcardsCodingYou get a list of patterns over 0, 1 and a wildcard that matches either bit, and a query string of bits. Return the pattern that matches the query best. Agree on what "best" means…
    Last asked Jan 2026
  • Design a distributed rate limiterSystem designDesign a rate limiter that enforces a token-bucket limit per client across a fleet of servers. Cover where the limiter sits, where the bucket state lives (a shared store, local…
    Last asked Jan 2026
  • Design a notification systemSystem designA shared service other teams call to send push, email and SMS notifications: templates, user preferences, retries, deduplication and rate limits.
    Last asked Jan 2026
  • Dot product of run-length encoded vectorsCodingA very long integer vector has many repeated values. Design a compact representation for it (for example, runs of value and count), then compute the dot product of two vectors…
    Last asked Jan 2026
  • Top-k and bottom-k words in a list and in a streamCoding1. Given a list of words, return the k most frequent and the k least frequent. 2. Now the words arrive as a stream: keep both answers available at any moment. 3. Discuss how to…
    Last asked Jan 2026
  • Distance from every cell to the nearest taxiCodingA grid marks the cells where taxis are parked. Return, for every cell, the distance to the nearest taxi (moving up, down, left or right). Use a multi-source BFS and say why it…
    Last asked Jan 2026
  • Fast expensive tokens versus slow cheap tokensAI systemAn LLM provider offers fast but expensive tokens and slow but cheap ones. How would you decide which to use for a product? Discuss which features need low latency, batch versus…
    Last asked Jan 2026
  • K largest subset sumsCodingYou get n items with non-negative weights. Return the k largest subset sums, in decreasing order (subsets are distinct by the items they contain). Brute force over all subsets is…
    Last asked Jan 2026
  • Meeting rooms with delayed starts: the busiest roomCodingThere are n rooms numbered from 0 and a list of meetings with distinct start times. Each meeting takes the free room with the lowest number; if none is free, it waits for the…
    Last asked Jan 2026
  • Range queries: is the subarray parity-alternatingCodingCall an array special when every pair of neighbouring elements has different parity (one odd, one even). Given an integer array and many queries from, to, answer for each query…
    Last asked Jan 2026
  • Shortest subarray with at least k distinct valuesCodingYou are given an integer array arr and an integer k. Call a contiguous subarray good if it contains at least k different values. Return the length of the shortest good subarray…
    Last asked Jan 2026
  • Design a hit counterCodingImplement a counter with hit(timestamp) and gethits(timestamp), where gethits returns the number of hits in the last five minutes. Timestamps arrive in order. Follow-ups: many…
    Last asked Jan 2026
  • Design a poker gameOO designDesign the classes for a poker game: cards, deck, players, hands, betting rounds, and deciding the winner. Show the main methods, how a round flows from deal to showdown, and how…
    Last asked Jan 2026
  • Design near-duplicate video detection at scaleSystem designDetect when an uploaded video is a near copy of one already on a very large platform (re-encoded, cropped, trimmed). Cover how videos are fingerprinted or embedded, how candidates…
    Last asked Jan 2026
  • Logger that reports its top K messagesCodingBuild a logger that receives messages over time and can return the k most frequent messages at any point. Choose structures so logging stays fast and the top-K query is efficient…
    Last asked Jan 2026
  • Longest strictly increasing contiguous subarrayCodingReturn the length of the longest contiguous subarray whose elements strictly increase. Solve it in one pass and constant extra space, then discuss variants such as returning the…
    Last asked Jan 2026
  • Median of two run-length encoded arraysCodingTwo sorted arrays are given in run-length form (value and count pairs). Return the median of all their values combined, without expanding the runs. Explain how binary search on…
    Last asked Jan 2026
  • Winner of a stack-merging gameCodingTwo players take turns merging stacks according to the game's rules until no move is left. Given the starting stacks, decide which player wins if both play optimally. Start with a…
    Last asked Jan 2026
  • Your A/B test won, but you worry about the long termBehavioralYour change won its A/B test and the team wants to launch, but you are concerned about long-term effects the experiment could not show. What do you do? A good answer names the…
    Last asked Jan 2026
  • All subsets of a list with duplicatesCodingReturn every distinct subset of an integer list that may contain duplicate values, with no subset repeated. Sort first and skip duplicates during backtracking, and give the output…
    Last asked Jan 2026
  • Recover the original array from its doubled shuffleCodingAn array was built by taking an original array, appending twice each of its values, and shuffling the result. Given the shuffled array, return the original, or an empty result if…
    Last asked Jan 2026
  • Set with constant-time insert, delete and get randomCodingDesign a set with add, remove and getrandom, all in average O(1); getrandom returns each element with equal probability. Handle empty-set and missing-element cases. Follow-up: how…
    Last asked Jan 2026
  • Match people to questions using tags and prioritiesCodingPeople have skill tags and questions have tags and priorities. Assign questions to people so each question goes to someone whose tags fit, higher-priority questions are served…
    Last asked Dec 2025
  • Most deliveries on a line within a distance limitCodingDelivery points lie on a number line and the courier may travel at most a given distance. Choose deliveries to complete as many as possible, and among the best choices, minimise…
    Last asked Dec 2025
  • Design a feed recommendation systemML designRank the items in each user's home feed so they engage more, choosing from millions of candidates within a couple of hundred milliseconds.
    Last asked Dec 2025
  • Concurrent same-host web crawlerCodingImplement a web crawler that finds every page reachable from a start URL on the same host, and fetches pages concurrently. You are given a blocking helper: Write: python def…
    Last asked Dec 2025
  • Implement a transformer block with SwiGLUCodingWrite a transformer block from scratch: multi-head self-attention, the residual connections and normalisation, and a feed-forward layer that uses the SwiGLU gate (two parallel…
    Last asked Dec 2025
  • Design a top-K popular items systemSystem designReport the K most viewed or played items over sliding windows (last minute, hour, day) from a firehose of billions of events per day.
    Last asked Dec 2025
  • Shortest delivery route that avoids dangerous stopsCodingA delivery network is a graph of stops, and some stops are marked dangerous. Find the shortest route from the depot to the destination that avoids the dangerous stops (or limits…
    Last asked Dec 2025
  • Top K similar movies from a similarity graphCodingMovies are nodes with a rating, and an edge links two similar movies; similarity carries across edges. Given a movie and k, return the k highest-rated movies reachable from it…
    Last asked Dec 2025
  • Largest group of two-digit numbers that share digitsCodingYou get a list of two-digit numbers. Two numbers are linked when they share a digit, and links carry over (if a shares with b and b with c, all three are in one group). Return the…
    Last asked Dec 2025
  • Running median of a streamCodingNumbers arrive one at a time; after each, report the median of everything seen so far. Use two heaps. Follow-ups: the values come from a small range (use counts instead of heaps);…
    Last asked Dec 2025
  • Design the ML system for self-driving perceptionML designDesign the perception system of a self-driving car: which sensors feed it, which models detect and track objects, how training data is collected and labelled, how you evaluate…
    Last asked Dec 2025
  • GRPO-style reinforcement learning for diffusion modelsML designExplain how a group-relative policy optimisation method (GRPO) works for language models, then how you would adapt it to fine-tune a diffusion model against a reward: what counts…
    Last asked Dec 2025
  • Longest duplicated substringCodingReturn any longest substring that occurs at least twice in a string (the occurrences may overlap), or an empty string if none does. Binary search on the length with a rolling…
    Last asked Dec 2025
  • Maximum value in a file too big for memoryCodingA very large text file holds one number per line. Return the largest value. Then speed it up: split the file into chunks, find each chunk's maximum in parallel, and combine. Write…
    Last asked Dec 2025
  • Shuffle an array with a random-integer functionCodingUsing only a function that returns a uniform random integer in a range, shuffle an array (for example a deck of cards) so every permutation is equally likely. Implement…
    Last asked Dec 2025
  • The skyline problemCodingBuildings are given as left, right, height rectangles on flat ground. Return the outline of the skyline they form, as the list of key points where the height changes. Use a sweep…
    Last asked Dec 2025
  • Three sum: unique value triplesCodingReturn every unique triple of values from an integer array that sums to zero (or to a given target), with no duplicate triples in the output. Sort, then fix one value and move two…
    Last asked Dec 2025
  • Two sum with the lexicographically smallest index pairCodingGiven an integer array and a target, return a pair of indices i < j whose values add up to the target. When several pairs work, return the lexicographically smallest one (smallest…
    Last asked Dec 2025
  • Collect coins with tokens that move three steps rightCodingA one-row board is a string of . (empty), T (a token) and C (a coin). A move takes any token exactly three cells to the right, onto a cell no token occupies; landing on a coin…
    Last asked Dec 2025
  • Many timers on top of one underlying timerCodingThe system offers a single timer: setting it replaces any earlier setting, and it calls a handler when it expires. Build a class that supports many independent timers on top of…
    Last asked Dec 2025
  • Top K most active users from chat logsCodingYou get chat log lines, each naming the users involved. Return the k users who took part in the most chats. Count with a hash map, then compare picking the top k by sorting, by a…
    Last asked Dec 2025
  • Add two big integers stored as digit listsCodingTwo non-negative integers too large for built-in types are given as lists of digits. Return their sum in the same form. Handle different lengths and the final carry, and say how…
    Last asked Nov 2025
  • Count single-colour squares in a character gridCodingEach cell of a grid holds a character standing for a colour. Count all square sub-grids whose cells all have the same colour, of every size. Use the DP where each cell stores the…
    Last asked Nov 2025
  • Safe ranges between planets' gravity zonesCodingPlanets sit on a line; each is given as (center, radius) and makes the range within its radius unsafe. Return the safe ranges between the unsafe zones, in order. Turn each planet…
    Last asked Nov 2025
  • Mode of a ternary search treeCodingIn this tree each node has up to three children: the left subtree holds smaller values, the middle child equals the node's value, and the right subtree holds larger values. Return…
    Last asked Nov 2025
  • Settle group trip expenses with the fewest transfersCodingFriends on a trip record payments: each record names the payer, the amount and the people it covered (the payer may be among them), split evenly. Compute each person's net…
    Last asked Nov 2025
  • Design a menu update system for a global restaurant chainSystem designHeadquarters controls the menus shown on many kinds of devices in restaurants worldwide. Menus share global items but have local parts per country, and they change for breakfast…
    Last asked Nov 2025
  • Objects seen on both days by at least two clientsCodingTwo log files, one per day, hold lines of timestamp, objectid, clientid. Return the object ids that appear on both days and were accessed by at least two different clients. Then:…
    Last asked Nov 2025
  • Binary tree right side viewCodingReturn the values visible when you look at a binary tree from the right: the last node of each level, top to bottom. Follow-ups: the left side view, and both views in a single…
    Last asked Nov 2025
  • Find K pairs with the smallest sumsCodingGiven two sorted arrays and k, return the k pairs (one number from each array) with the smallest sums. Start a min-heap with pairs formed from the first elements and push the next…
    Last asked Nov 2025
  • Fewest guesses in Wordle with green feedback onlyCodingA secret five-letter word must be found, and the only feedback is, for a guess, which positions hold the right letter. Design a guessing strategy that finds the word in as few…
    Possibly retired
  • Max profit when taking a value skips aheadCodingYou walk an array of positive integers from index 0. At index i you either take arri and jump to index i + 1 + arri, or skip it and move to i + 1. Return the largest total you can…
    Possibly retired
  • Store words for lexicographic range queriesSystem designDesign storage for a set of words that returns every word in a lexicographic range low, high. For the words aa, aaa, ac, f, z, the range a, b gives aa, aaa, ac and ab, b gives ac…
    Possibly retired
  • Design a Kafka-like distributed message queueSystem designDesign a durable, partitioned log that producers append to and many consumer groups read at their own pace, surviving broker failures without losing acknowledged messages.
    Possibly retired
  • Design an elevator control systemOO designModel a bank of elevators: hall and car requests, a dispatching strategy, direction and door states, and capacity limits.
    Possibly retired
  • Shortest path that avoids blocked nodesCodingGiven an unweighted graph, a start node and a set of blocked nodes that cannot be entered, return the shortest distance from the start to every node (or to a given end node), with…
    Possibly retired
  • Allocate servers from a pool of mixed node typesCodingA pool holds servers of several node types. Requests ask for a number of servers of a given type; the allocator hands them out and takes them back on release. Design the class and…
    Possibly retired
  • Autocomplete with a trieCodingBuild an autocomplete: insert words (optionally with counts) into a trie, and for a prefix return the matching words, for example the most popular few. Make sure results are…
    Possibly retired
  • Count user sessions from an activity logCodingEach log line is timestamp, user, action. A session is a run of a user's actions with no gap longer than a given timeout. Return the number of sessions per user. Parse robustly…
    Possibly retired
  • Design a distributed key-value storeSystem designStore and serve billions of keys with low latency, partitioned across machines and replicated to survive failures, with tunable consistency.
    Possibly retired
  • Design a distributed task scheduler with dependenciesSystem designDesign a system that runs jobs made of tasks with dependencies between them, including long-running tasks. Cover how jobs and their dependency graphs are stored, how ready tasks…
    Possibly retired
  • Design a high-throughput publish-subscribe event systemSystem designProducers publish events on topics and many subscribers receive the events they subscribed to. Design it for very high throughput: subscription management, fan-out, delivery…
    Possibly retired
  • Design a key management serviceSystem designDesign a service that creates, stores and rotates encryption keys for other services and performs encrypt and decrypt calls for them. Cover how master keys are protected (hardware…
    Possibly retired
  • Design a migration from a relational database to NoSQLSystem designA live service must move its data from a relational database to a NoSQL store without downtime. Design the migration: modelling the data for the new store, the initial bulk copy…
    Possibly retired
  • Design a protocol for distributed transactionsSystem designA transaction must update data held by several independent services or shards, so that either all changes happen or none do. Design the protocol: how participants agree to commit…
    Possibly retired
  • Design a watch history and resume-playback serviceSystem designRecord what each user watched and how far they got, so playback resumes at the right point on any device. Cover the API, how often progress is written, storage for a very large…
    Possibly retired
  • Design school-to-guardian messaging with acknowledgmentsSystem designA school sends messages (announcements, alerts, notes about a student) to parents and guardians, who must acknowledge important ones. Design delivery over several channels…
    Possibly retired
  • Design the APIs of an executable notebook serviceSystem designUsers write notebooks of code cells and run them on the server. Design the APIs for creating and saving notebooks and running cells, and the system behind them: isolated execution…
    Possibly retired
  • Diagnose inconsistent data in a distributed databaseSystem designUsers report reading different values for the same record from a replicated database. How do you find the cause? Go through replication lag, read and write consistency settings…
    Possibly retired
  • From 0/1 knapsack to bounded knapsackCodingStart with the 0/1 knapsack: items with weights and values, a capacity, and each item used at most once; return the best total value. Then each item may be used up to a given…
    Possibly retired
  • Group movies by graph traversalCodingMovies are linked to each other (for example by shared attributes or similarity pairs). Put every movie into its group, where a group is a set of movies connected through links…
    Possibly retired
  • Make your interview solution production-readyCodingAfter solving a coding problem, the interviewer asks what you would change before the code went to production. Discuss input validation and error handling, tests, logging and…
    Possibly retired
  • Minimum window substringCodingGiven strings s and t, return the shortest substring of s that contains every character of t, counting repeats, or an empty string if there is none. Grow the window until it…
    Possibly retired
  • Multiply two matrices across two GPUsML designMatrices A and B must be multiplied using two GPUs, with both matrices split between them. How do you partition the work (by rows, by columns, by blocks), what has to move between…
    Possibly retired
  • Predict the reaction factor of two moleculesML designA dataset gives pairs of molecules and the reaction factor measured for each pair. Build a model to predict the reaction factor for new pairs. Walk through exploring the data…
    Possibly retired
  • Robust Python generator, then a weighted oneCoding1. Write a Python generator that yields the numbers of an input list, with unit tests. Handle edge cases such as None values and an empty list. 2. Change it to yield numbers from…
    Possibly retired
  • SLIs, SLOs and SLAs, then a monitoring designSystem designExplain the difference between SLIs, SLOs and SLAs with an example service. Then design its monitoring: which indicators you measure, how you set targets and error budgets, what…
    Possibly retired
  • Split a file iterator into balanced line-aligned partsCodingSplit a large file into balanced parts for parallel workers without cutting lines in half: each part holds whole lines and the parts stay close in size. Reported on 1point3acres'…
    Possibly retired
  • Split a two-colour necklace fairly with two cutsCodingA necklace (a circle of beads) holds two kinds of gems, each in an even count. With at most two cuts, divide it into pieces and hand them to two people so each gets the same…
    Possibly retired
  • Troubleshoot high CPU, slow responses and DNS failuresCodingA production service shows high CPU, rising latency, and some requests failing on name resolution. Explain step by step how you investigate each: the tools and commands you would…
    Possibly retired
  • Validate a bracket string after digit-driven deletionsCodingA string mixes brackets and digits, for example (())2)1(). Each digit d requires removing exactly d of the brackets that come before it. Decide whether the deletions can be chosen…
    Possibly retired
  • Binary tree zigzag level-order traversalCodingReturn a binary tree's values level by level, alternating direction: left to right on the first level, right to left on the next, and so on. Use a BFS by levels and reverse (or…
    Possibly retired
  • Log manager that evicts the least important logsCodingDesign a log manager that keeps at most totalmax logs. Each log has an importance; when a new log would go over the limit, the least important logs are deleted automatically…
    Possibly retired
  • Validate a course catalog's prerequisitesCodingA course catalog lists each course and its prerequisites. Check that the catalog is valid: every prerequisite exists and there is no cycle, so all courses can be taken in some…
    Possibly retired
  • Design a bandit recommender that learns from feedbackML designAt each interaction the system must show one item out of a few candidates and then sees whether the user responded. Design a recommender that learns from that feedback online: the…
    Possibly retired
  • Can left and right pieces slide into a target stringCodingA string holds pieces that can only move left, pieces that can only move right, blanks, and walls that nothing passes. Given a start and a target string, decide whether the start…
    Possibly retired
  • N-th license plate in sorted orderCodingLicense plates follow a fixed format, for example three letters A-Z then three digits 0-9 (AAA000). Sorted in dictionary order, what is the n-th plate? Compute it directly by…
    Possibly retired
  • Unique users per activity and average time on siteCodingEach record captures one user's action on a website, with the user, the activity and the time. Write code that returns the number of unique users for each activity and the average…
    Possibly retired
  • What if the input is too big for memoryCodingA common follow-up to a coding question: what changes if the input is very large? Explain how you would answer it: whether the data still fits in memory and how to cut extra…
    Possibly retired
  • Delete a node from a binary search treeCodingGiven the root of a binary search tree and a key, delete the node with that key and return the root, keeping it a valid BST. Handle the cases of a leaf, a node with one child, and…
    Possibly retired
  • Design Google DocsSystem designMany people edit the same document at once and see each other's changes and cursors live, with offline edits and full version history.
    Possibly retired
  • Merge two sorted linked listsCodingMerge two sorted linked lists into one sorted list and return its head, reusing the existing nodes. Do it iteratively with a dummy head, then discuss the recursive version.
    Possibly retired
  • Walk through a dashboard you built and improvedBehavioralDescribe a dashboard you built: who used it, where the data came from, the tools you used, how you found problems in it or in the data, and what you changed. Expect follow-ups on…
    Possibly retired
  • Koko eating bananasCodingThere are piles of bananas and h hours. Each hour Koko eats up to k bananas from one pile. Return the smallest integer k that lets her finish every pile within h hours. Binary…
    Possibly retired
  • Number of islandsCodingGiven a binary matrix, return how many islands it has: groups of 1 cells connected up, down, left or right (diagonals don't connect).
    Possibly retired
  • ATM queue exit orderCodingThere are n people waiting in a single line at an ATM. They are numbered 1 to n from the front of the line to the back. You are given an integer array amounts, where amountsi is…
  • Ball picking game: take one or two from the frontCodingBalls stand in a single line. Each ball has an integer value, which may be positive, zero, or negative. Two players take turns, and player 1 moves first. Both start with a score…
  • Cake order fulfillment checkCodingA bakery keeps three kinds of cake. Its stock is an array stock of length 3, where stocki is how many cakes of type i are on hand. Orders arrive one at a time in the list orders…
  • Count distinct values in every sliding windowCodingGiven an integer array nums and a window size k, return a list with one entry per contiguous window of length k (there are len(nums) - k + 1 of them). Each entry is the number of…
  • Count intervals covering a pointCodingBuild a data structure over a fixed list of closed intervals on the integer number line that answers many point queries quickly. An interval l, r covers a point x when l <= x <=…
  • Design a bot detection systemML designSeparate automated traffic from real users on a large website, in real time, while bots adapt to whatever you deploy.
  • Design a distributed job schedulerSystem designDesign a service that runs millions of scheduled and on-demand jobs (cron-like and one-off) reliably across a fleet of workers.
  • Design a metrics monitoring systemSystem designCollect metrics from every host and service, store them as time series, power dashboards over months of data, and alert when thresholds are crossed.
  • Design a news feedSystem designDesign the home feed for a social network with 1B users: posts from people you follow, ranked, fresh within seconds.
  • Design a payment systemSystem designAccept card payments for merchants: authorize, capture, settle with card networks, and reconcile, never charging twice or losing money.
  • Design a rate limiterSystem designDesign a service that limits how many requests each API client can make. It sits in front of every API endpoint at high traffic.
  • Design a Slack-like chat systemSystem designWorkspaces, channels, threads and direct messages with real-time delivery, unread state, search and history, for large companies.
  • Design a VM bandwidth rate limiterSystem designCap the network bandwidth each virtual machine in a cloud region may use, enforcing per-tenant limits across many hosts without adding latency to packets.
  • Design an address autofill systemML designAs a user types an address, suggest the full, valid address they mean, ranked by likelihood and personalized by location and history.
  • Design an S3-like object storage systemSystem designStore trillions of objects of any size with eleven nines of durability, and serve reads and writes over an HTTP API at high throughput.
  • Design DropboxSystem designSync files across a user's devices and shared folders: upload large files reliably, transfer only what changed, and handle conflicting edits.
  • Design Facebook MessengerSystem designOne-to-one and group messaging for a billion users: real-time delivery, offline sync, read receipts and message history on every device.
  • Design Google NewsSystem designGather articles from thousands of publishers, group stories about the same event, and show each reader a fresh, personalized front page.
  • Design InstagramSystem designUsers post photos and videos, follow each other and scroll a feed; design upload, storage, feed generation and serving media worldwide.
  • Design SpotifySystem designStream music to hundreds of millions of listeners: catalog, search, playlists, smooth playback over bad networks, and offline downloads.
  • Design TinyURLSystem designTurn long URLs into short links and redirect visitors fast, at billions of redirects a day, with optional custom aliases and expiry.
  • Design typeahead suggestionsSystem designSuggest completions as the user types into a search box, within tens of milliseconds, ranked by popularity and fresh with trending queries.
  • Design YouTubeSystem designUpload videos, transcode them into many formats, and stream them worldwide with adaptive bitrate, along with views, likes and comments.
  • Dot grid game winnerCodingTwo players play a dots-and-boxes style game on a 9 x 9 grid of dots. The grid has 8 x 8 = 64 unit squares ("boxes"). Rows and columns are numbered 0 to 8. You are given moves, a…
  • Fewest coins that cover every amount up to a limitCodingYou are given a list of coin denominations (positive integers) and an integer maxamount. You may take any number of coins of each denomination. Choose a multiset of coins so that…
  • Fewest range increments to build a target arrayCodingYou start with an array of n zeros. In one move you choose a contiguous range l, r and add 1 to every element in it. Given a non-negative integer array target of length n…
  • Greatest three-digit subsequenceCodingYou are given a list digits of single digits (each 0–9). Choose at most three of them, keep them in their original order, and read them left to right as a number. Return the…
  • Grep with context linesCodingImplement a simplified grep. You get a list of text lines, a search string target, and a non-negative integer k. Return every line that contains target, together with up to k…
  • Group duplicate records that share any propertyCodingYou are given a list of records. Each record has a unique integer ID and three properties, for example a name, an email and a phone number: Two records are duplicates when they…
  • Implement an LRU cacheCodingImplement a least-recently-used cache with get(key) and put(key, value), both in O(1) time, with a fixed capacity.
  • Largest island perimeter in a gridCodingYou are given an m x n grid where each cell is either land ("1") or water ("0"). Land cells that touch horizontally or vertically (not diagonally) belong to the same island. Treat…
  • Largest value shared by two BSTsCodingYou are given the roots of two binary search trees, a and b, holding integer values. Return the largest integer that appears in both trees. If the trees share no value, return -1…
  • Longest run of customers a bank can serveCodingA bank opens with initial dollars in its vault (initial = 0). Customers wait in a fixed queue, given as an integer array transactions: a positive value is a deposit and a negative…
  • Max flight distance with limited energyCodingYou are planning a trip over n days. disti is how far you can fly on day i (a non-negative integer). You start with k units of energy, and k is also the most energy you can hold…
  • Median of a large unsorted array in linear timeCodingYou are given a very large, unsorted list of integers nums. Return its median. - If len(nums) is odd, the median is the middle value once the list is sorted. - If len(nums) is…
  • Peel an N-ary tree one leaf layer per dayCodingEvery day, all leaves of an N-ary tree fall off at the same time. A leaf is a node with no children left. When a node loses its last child, it becomes a leaf and falls on the next…
  • Per-domain sliding-window rate limiterCodingA gateway receives requests one at a time, at most one per second. Each request names a domain. Build a rate limiter that keeps its state between calls and decides, for each…
  • Queue with constant-time min and maxCodingImplement a FIFO queue of integers that can also report its smallest and largest element at any time. Implement the MinMaxQueue class: - MinMaxQueue() creates an empty queue. -…
  • Reachable sum with reusable values and a huge targetCodingGiven a non-empty list nums of positive integers and a target k, return true if some multiset of values from nums sums to exactly k, and false otherwise. You may use each value…
  • Recent search history with a size limitCodingBuild the recent-searches list behind a search box. When the user focuses the box, it shows their most recent distinct searches, newest first. Every search the user runs is…
  • Red and black tile slides and jumpsCodingA strip of cells holds red tiles (R), black tiles (B) and empty cells (). The board is a string such as "RRBB". Movement rules - A red tile only moves right. A black tile only…
  • Remove parentheses from a plus/minus expressionCodingWrite a function simplify(expr: str) - str that removes every parenthesis from an expression and gives each term the sign it really has. Input. A valid expression made of: -…
  • Root of the largest tree in a forestCodingYou are given a list relations. Each entry child, parent says that parent is the direct parent of child. Together the relations form a forest: there are no cycles, and every node…
  • Tallest building between parking lotsCodingA city block is drawn as a rectangular grid of strings. Each tile is one of: - 'P': a parking lot. Its height is fixed at 0. - '-': a lot where a building can go. You choose its…
  • Two cars to their destinations without collisionsCodingA parking robot controls two self-driving cars on a rectangular map. The map is a list of equal-length strings. Each character is one cell: - . is road. - is a wall. Cars cannot…
  • Type a word on a grid keyboard with a jump limitCodingYou are typing a word with one finger on an unusual keyboard: an m x n grid of characters. Moving the finger from cell (r1, c1) to cell (r2, c2) covers a Manhattan distance of r1…
  • Unix find command with pluggable filtersCodingImplement a small version of the Unix find command over an in-memory file system. The file system holds directories and files. Each file has a name and a size in bytes. Its…
  • Valid date from three integers in any orderCodingYou are given three integers a, b and c. Their order is unknown: any one of them may be the year, the month or the day. This covers formats such as yyyy-MM-dd, MM-dd-yyyy and…