Microsoft

A short recruiter call, an online assessment or phone screen, then four 60-minute rounds (three coding with some behavioral questions, one system design) on a team schedule or a fixed Hiring Event day. Microsoft AI runs its own loop with a project deep dive and practical coding problems.

223 questions

  • Why this company, why this role, and why nowBehavioralIntroduce yourself, then explain why you want this company and this role, and why you are looking to move now. Name a few traits that make you a fit for the team, account for past…
    Last asked Sep 2026
  • Greedy and beam search decoding for a language modelCodingYou are writing the decoding step for a language model. Decoding turns the model's per-step scores into a sequence of token ids. Implement greedydecode(scores: listlistfloat) -…
    Last asked Sep 2026
  • How do you use AI in your work?BehavioralDescribe how AI tools fit into your engineering work: where they help, where they fail, how you verify their output, and how they have changed the way you or your team work.
    Last asked Sep 2026
  • Collaborating with teammates across regions and from homeBehavioralYour team is spread over several regions and some people work from home. How do you collaborate in each setting: overlap hours, written communication, decisions, keeping people in…
    Last asked Sep 2026
  • Design a lab machine fleet monitor with remote rebootSystem designDesign a service that watches a fleet of lab machines running compute workloads. Each machine polls the service for work; a work item names a payload the machine must download…
    Last asked Sep 2026
  • Negative feedback you received and what you changedBehavioralTell me about a time you got negative feedback. A good answer picks feedback that stung and pointed at a real gap, describes how you reacted in the moment, what you did…
    Last asked Sep 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 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
  • Per-key ordered task executor on a thread poolCodingBuild a component that takes a maximum concurrency and an existing thread-pool executor and exposes submit(key, task). Tasks with the same key must run one at a time in the order…
    Last asked Sep 2026
  • Design a global one-to-one voice calling systemSystem designDesign voice calls between registered mobile users worldwide, at millions of users. A caller rings another user, the callee gets an incoming-call notification and accepts or…
    Last asked Sep 2026
  • Design a voice and chat AI receptionist for businessesAI systemBusinesses want an AI receptionist that answers their phone number and chats on their website, app and messaging channels. It answers from information the business has approved…
    Last asked Sep 2026
  • First value seen twice in a left-to-right scanCodingWalk an integer array from left to right and return the first value you meet for the second time, or -1 when no value repeats. The answer is decided by where the second occurrence…
    Last asked Sep 2026
  • Latency got worse right after a deploy: what do you do?System designA new version went out and 10 to 15 minutes later latency or reliability is degrading. Explain how you would notice, how you decide whether to roll back right away or investigate…
    Last asked Sep 2026
  • Requirements changed in the middle of the projectBehavioralTell me about a project whose requirements changed while you were building it. Say exactly what changed and how you found out, what you did in the following days, which calls were…
    Last asked Sep 2026
  • 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 Sep 2026
  • Design a nearby points-of-interest serviceSystem designGiven a user's location, return the closest restaurants, shops and other places of interest within a radius, fast, for a read-heavy global audience.
    Last asked Sep 2026
  • Longest repeating character replacementCodingGiven a string of uppercase letters and an integer k, you may change at most k characters to any other letter. Return the length of the longest substring that can be made of one…
    Last asked Sep 2026
  • Most visited position on a circular trackCodingA race runs over a circular track of numbered sections, given as the order of sections it passes through. Return the section or sections visited most often. Only the title of this…
    Last asked Sep 2026
  • Convert a hexadecimal address to dotted IPv4CodingGiven a 32-bit address written in hexadecimal, return it in dotted-decimal IPv4 form, for example C0A80001 becomes 192.168.0.1. Decide and state how you treat an optional 0x…
    Last asked Aug 2026
  • Parse a signed integer in any base, with overflow checksCodingWrite a production-quality parser that turns a string into a 32-bit signed integer in a given base. Handle signs, digits and letters valid for the base, and report invalid syntax…
    Last asked Aug 2026
  • Reconstruct digits from scrambled English number wordsCodingA string holds the shuffled letters of some English digit words (zero to nine). Recover the digits and return them in ascending order, repeats included. Explain the order in which…
    Last asked Aug 2026
  • Stable, unique column names across schema snapshotsCodingYou receive successive snapshots of table schemas and must give every column an effective name. Dots in an original name become underscores, and effective names must be unique…
    Last asked Aug 2026
  • Alien dictionaryCodingYou get a list of words sorted in the dictionary order of an unknown alphabet. Derive an order of the letters that is consistent with it, or report that none exists. Explain how…
    Last asked Aug 2026
  • Word breakCodingReturn whether a string can be split into a sequence of words from a dictionary, where words may be reused. Give the dynamic programming solution and its cost.
    Last asked Aug 2026
  • Maximum subarray sum of an array repeated k timesCodingWrite an integer array out k times back to back and return the largest sum of a non-empty contiguous subarray of the result. Do it without building the repeated array, and explain…
    Last asked Aug 2026
  • Predict employee attrition and explain what drives itML designYou get an HR dataset with one row per employee (age, job role, monthly income, overtime and similar columns) and a label saying whether the person left. Build a model that…
    Last asked Aug 2026
  • Count the maximum in each queried suffixCodingYou are given an integer array nums of length n and an array query of 0-based start indices. For each index i in query, look at the suffix numsi, numsi+1, ..., numsn-1. Find the…
    Last asked Aug 2026
  • Count binary substringsCodingCount the non-empty substrings of a binary string that have the same number of 0s and 1s, with all the 0s together and all the 1s together. Solve it in one pass by comparing…
    Last asked Aug 2026
  • Delete and earnCodingTaking a value x from the array earns x points but deletes every x - 1 and x + 1. Return the most points you can earn. Explain how this reduces to the house robber recurrence over…
    Last asked Aug 2026
  • 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.
    Last asked Aug 2026
  • Design an incident ticket correlation platformSystem designDesign a platform that takes in a high volume of incident tickets and alerts at the same time and groups the ones caused by the same underlying problem, so responders see one…
    Last asked Aug 2026
  • Find the words in a list that are anagrams of a targetCodingGiven a target word and a list of words, return the entries that are anagrams of the target. Compare sorting each word with counting letters, and discuss case and non-letter…
    Last asked Aug 2026
  • Design an ad click aggregation systemSystem designCount ad clicks per ad and per time window from billions of events a day, accurately enough to bill advertisers, with results available within minutes.
    Last asked Aug 2026
  • Count non-decreasing arrays with given digit sumsCodingYou get an array requiredSum of length n. Count arrays result of length n that are non-decreasing and where the digit sum of resulti equals requiredSumi for every i, within the…
    Last asked Aug 2026
  • Thread safety and deadlocks, explained and demonstratedCodingA fast concepts round. What makes code thread-safe? Show the common ways a deadlock happens (for example two threads taking two locks in opposite order) and the ways to prevent…
    Last asked Aug 2026
  • Top k largest elementsCodingGiven an integer array nums and an integer k, return the k largest elements of nums. You may return them in any order. The result is a multiset. If a value appears several times…
    Last asked Aug 2026
  • Capacity to ship packages within D daysCodingPackages stand in a line with known weights and must be shipped in that order, one trip a day, by a ship with a fixed weight capacity. Return the smallest capacity that ships…
    Last asked Aug 2026
  • Copy list with random pointerCodingEach node of a singly linked list has a next pointer and a random pointer that may point to any node in the list or to nothing. Return a deep copy of the list in which no pointer…
    Last asked Aug 2026
  • Design log storage with live tailing of growing filesSystem designProducers keep appending records to log files at very high volume. Store them durably and let users read files back, including users who read a file while it is still being…
    Last asked Aug 2026
  • Design TinyURLSystem designTurn long URLs into short links and redirect visitors fast, at billions of redirects a day, with optional custom aliases and expiry.
    Last asked Jun 2026
  • Design a recommender for local sports teams and newsML designRecommend local sports teams, and the news about them, to each user. Discuss what data you collect and how it is produced, what you know about the user (location, follows…
    Last asked Jun 2026
  • Lowest common ancestor in a BST and in a binary treeCodingGiven two nodes, return their lowest common ancestor first in a binary search tree, using the ordering, and then in a plain binary tree where you cannot rely on it. Explain both…
    Last asked Jun 2026
  • Encode and decode TinyURLCodingImplement a class that turns a long URL into a short one and back, in memory. Discuss counter-based versus random or hash-based codes, collisions, the same long URL submitted…
    Last asked Jun 2026
  • Find the bugs in an AI-generated URL shortenerCodingYou are handed a URL shortener that an AI assistant wrote. Read it, find what is wrong (correctness, collisions, validation, concurrency) and fix it, explaining each problem. Only…
    Last asked Jun 2026
  • 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.
    Last asked Jun 2026
  • 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.
    Last asked Jun 2026
  • Sort a 500 GB CSV by one column with 16 GB of RAMSystem designA CSV file of about 500 GB must be sorted by one of its columns on a machine with 16 GB of memory. Describe the external merge sort: cutting the file into chunks that fit in…
    Last asked Jun 2026
  • In-memory SQL table with filtering and multi-key sortingCodingBuild a small in-memory SQL-like database. You do not need to parse SQL text. Queries arrive as structured arguments. Implement SQLManager: - createtable(name: str, columns:…
    Last asked May 2026
  • Reconstruct a string from chained segmentsCodingA log-shipping service splits a long message into fragments and sends them out of order. Each fragment is a triple startid, endid, payload: it covers the stretch from marker…
    Last asked May 2026
  • Memory allocator with malloc, free and coalescingCodingManage one arena of size bytes, addressed by offset from 0. You hand out and take back ranges of it, like malloc and free in C. Nothing is stored in the arena itself; track it in…
    Last asked May 2026
  • Maximum XOR productCodingGiven a, b and n, choose x with 0 <= x < 2^n to maximize (a XOR x) (b XOR x), returned modulo a large prime. Explain the bit-by-bit greedy that keeps the two factors as close as…
    Last asked May 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 May 2026
  • Basic calculatorCodingEvaluate an arithmetic expression string with non-negative integers, +, -, , / (integer division toward zero) and spaces, respecting operator precedence, without eval. State the…
    Last asked May 2026
  • Design personalization memory for a chatbotAI systemDesign how an AI assistant remembers things about each user across conversations and uses them to personalize answers. Cover what to store and how it is extracted, retrieval at…
    Last asked May 2026
  • Design a low-latency product price update APISystem designDesign an API that updates the prices of specific products and makes the new prices visible quickly to everything that reads them. Cover the write path, how readers and caches…
    Last asked Apr 2026
  • 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.
    Last asked Apr 2026
  • 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.
    Last asked Apr 2026
  • Implement k-means clusteringCodingImplement k-means from scratch: initialize k centroids, assign every point to its nearest centroid, move each centroid to the mean of its points, and repeat until the assignments…
    Last asked Apr 2026
  • Cross-team dependencies and conflicts over scopeBehavioralTell me about work that depended on another team, where priorities or scope clashed. How did you find out, how did you negotiate, what did you escalate and when, and how did it…
    Last asked Apr 2026
  • Design a personalized search ranking systemML designRank search results for each user's query and context so they find and book (or order) what they want, learning from clicks and conversions.
    Last asked Apr 2026
  • Sort colors (three-way partition in place)CodingAn array holds only three kinds of values, such as 0, 1 and 2. Sort it in place in one pass without a counting sort. Explain the Dutch national flag partition and its invariants.
    Last asked Apr 2026
  • Pack fine-tuning samples into fixed-length sequencesCodingFor supervised fine-tuning, pack many tokenized samples of different lengths into sequences of a fixed maximum length so little space is wasted. Return the packed sequences with…
    Last asked Apr 2026
  • 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…
    Last asked Apr 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 Apr 2026
  • Palindrome linked list without modifying the listCodingDecide whether a singly linked list reads the same both ways. Do it without changing the list, or restore it exactly if you reverse part of it. Compare the stack approach with…
    Last asked Apr 2026
  • Spiral matrixCodingReturn all elements of an m x n matrix in spiral order: along the top row, down the right column, back along the bottom row, up the left column, then inward.
    Last asked Apr 2026
  • Design re-engagement notifications for inactive usersSystem designDesign a system that brings back users who stopped using an AI assistant product: decide who to contact, when and over which channel, what to say, how often, and how to measure…
    Last asked Apr 2026
  • Design a secure API for an AI assistantSystem designDesign the API through which clients call an AI assistant, with the focus on security. How are callers authenticated, how are tokens issued, signed and validated, how is each…
    Last asked Apr 2026
  • Balanced prefixes in a permutationCodingYou are given a permutation p of length n: every integer from 1 to n appears exactly once, in some order. Call a number k (with 1 <= k <= n) balanced if some contiguous subarray…
    Last asked Mar 2026
  • Weighted data batcher with deterministic resumeCodingBuild a sampler that draws weighted batches from a dataset registry and can resume deterministically from a saved offset, including the edge case where the batch size does not…
    Last asked Mar 2026
  • Snapshot set with frozen insertion-order iteratorsCodingImplement SnapshotSet, a set of integers whose iterators are frozen at the moment they are created. - add(value) - bool: insert value. Return False and do nothing if it is already…
    Last asked Mar 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 Mar 2026
  • Truncate model output at the first stop sequenceCodingImplement a function that returns the part of a string that comes before the earliest stop word. - text is any string. It may be empty. - stopwords is a list of non-empty strings…
    Last asked Mar 2026
  • Design an AI chatbot appAI systemBuild a chatbot app on top of a hosted LLM API: conversations, streamed answers, history, and per-user usage limits.
    Last asked Mar 2026
  • Final discounted prices and the items sold at full priceCodingEach item in a list gets a discount equal to the price of the first later item that costs no more than it; items with no such later item sell at full price. Return the total paid…
    Last asked Mar 2026
  • Typed task lock for mutually exclusive job typesCodingSome jobs on a shared accelerator pool must not run alongside jobs of a different kind. Each job runs on its own thread and has one of two types: "gen" or "score". Any number of…
    Last asked Mar 2026
  • Merge intervalsCodingGiven a list of intervals (for example time ranges), merge every group of overlapping intervals and return the result in sorted order.
    Last asked Feb 2026
  • Design a Slack-like chat systemSystem designWorkspaces, channels, threads and direct messages with real-time delivery, unread state, search and history, for large companies.
    Last asked Feb 2026
  • Design an online chess gameSystem designMatch players of similar rating, play live games with clocks, handle disconnects and reconnects, and keep game history and ratings.
    Last asked Feb 2026
  • Design a ticket booking systemSystem designSell seats for concerts and games where demand spikes the moment sales open: hold seats briefly, never sell one twice, and stay up under the rush.
    Last asked Feb 2026
  • Memory management in Python and JavaCodingExplain how Python and Java manage memory: reference counting and the cycle collector versus tracing garbage collection, generations, the stack and the heap, and what leaks still…
    Last asked Feb 2026
  • Authentication token manager with expiryCodingBuild a manager for tokens that live for a fixed time: generate(id, now), renew(id, now) which only works on a token that has not expired, and countunexpired(now). Discuss how…
    Last asked Feb 2026
  • Max points on a lineCodingGiven points on a plane, return the largest number of them that lie on one straight line. Explain how you represent slopes exactly (reduced fractions, not floats) and handle…
    Last asked Feb 2026
  • Meeting rooms IICodingGiven meeting start and end times, return the fewest rooms needed so no two overlapping meetings share a room, with a min-heap of end times or by sweeping sorted starts and ends.
    Last asked Feb 2026
  • Remove duplicates in place from an unsorted arrayCodingRemove repeated values from an unsorted array in place, keeping the first occurrence of each and their order, and return the new length. Compare a hash set with sorting first, and…
    Last asked Feb 2026
  • Decode a JWT by hand and explain browser authenticationCodingExplain how a browser stays signed in with JWTs: how the token is issued, stored and sent, and how the server checks it. Then decode a JWT string without a library: split it into…
    Last asked Feb 2026
  • Sliding-window request rate limiterCodingImplement a rate limiter that accepts at most limit requests in any window of ttl milliseconds. - allow(timestamp) is called once per incoming request. timestamp is in…
    Last asked Feb 2026
  • Assemble objects from chunks of an async streamCodingReads from an asynchronous stream return arbitrary chunks of bytes, so one object can be split across reads and one read can hold several objects. Write code that buffers the…
    Last asked Feb 2026
  • Clean OCR output into a training dataset for an LLMML designYou have a large amount of text produced by OCR. Design the pipeline that cleans it and turns it into a dataset for training a language model: fixing or dropping garbled text…
    Last asked Feb 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 Feb 2026
  • Design a job scheduler for ETL pipelinesSystem designDesign a system that runs ETL jobs on schedules and as dependency graphs: defining pipelines, triggering, distributing work to workers, retries, backfills, monitoring and avoiding…
    Last asked Feb 2026
  • Design a video vision-language model end to endML designDesign a model that understands video and answers questions about it in language: data and its labels, frame sampling and the video encoder, how visual tokens reach the language…
    Last asked Feb 2026
  • Idempotent request handling with idempotency keysCodingImplement a request handler that uses client-supplied idempotency keys so that retrying the same request returns the original result instead of doing the work twice. Handle two…
    Last asked Feb 2026
  • Product of array except selfCodingReturn an array where each position holds the product of every other element, without division and in linear time, using prefix and suffix products; then do it with constant extra…
    Last asked Feb 2026
  • Shortest cycle through each nodeCodingIn a weighted graph, find for every node the cost of the cheapest cycle that passes through it, or report that none exists. Only the title of this report was public; discuss the…
    Last asked Feb 2026
  • Sliding puzzle: fewest moves to solve the 15-puzzleCodingGiven a 4x4 sliding puzzle with one blank, return the fewest moves to reach the solved board, or report that it cannot be solved. Discuss the solvability check, BFS versus A or…
    Last asked Feb 2026
  • Design a RAG assistant with agentic toolsAI systemDesign an assistant that answers questions with retrieval-augmented generation and can call tools to act or fetch more information. Cover indexing, retrieval and re-ranking, when…
    Last asked Feb 2026
  • Closest latency pairs by minimum absolute differenceCodingA monitoring service records latency readings (whole milliseconds) and wants to flag readings that are suspiciously close to one another. Implement minabsdiffpairs(latencies:…
    Last asked Feb 2026
  • Design a logging serviceSystem designIngest logs from every service at terabytes per day, make them searchable within seconds, and keep them cheaply for months.
    Last asked Feb 2026
  • Precision and recall at k from a flaky top-k APICodingAn API returns a model's top-k predictions for each query, but calls sometimes fail or time out. Compute precision and recall against the true labels across a set of queries, with…
    Last asked Feb 2026
  • Distance from every desk to its nearest bathroomCodingAn office floor plan is a grid of bathrooms, desks and open floor. For every desk, return how many steps (up, down, left, right) it takes to reach the closest bathroom. Expect…
    Last asked Feb 2026
  • Populate next pointers in a perfect binary treeCodingIn a perfect binary tree, set each node's next pointer to the node to its right on the same level, or null at the end of a level. Do it with O(1) extra space by walking each level…
    Last asked Feb 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 Feb 2026
  • 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.
    Last asked Jan 2026
  • Choosing lock granularity for concurrent storageCodingFor a storage component used by many threads, compare one global lock, per-partition locks and per-object locks, plus reader-writer locks. Discuss throughput, deadlock risk and…
    Last asked Jan 2026
  • Design a database that tracks changes to resourcesSystem designDesign a store that records every change to a set of resources so users can see a resource's history and its state at any past time. Cover the data model, writes, queries over…
    Last asked Jan 2026
  • 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.
    Last asked Jan 2026
  • Design live comments for a live streamSystem designViewers post comments on a live video and everyone watching sees them in near real time, including streams with huge audiences. Cover the write path, fan-out to viewers…
    Last asked Jan 2026
  • Design REST APIs for storing JSON filesSystem designDesign the REST API and the backend for a service that stores and serves JSON documents: resource paths, methods, versioning, partial updates, concurrency control, large files and…
    Last asked Jan 2026
  • Group GPUs by node, then partition them by linksCodingGiven a list of GPUs with the node each sits on and the high-speed links between them, group the GPUs by node and then split each group into sets connected through links. Only the…
    Last asked Jan 2026
  • Owning and debugging infrastructure modulesBehavioralFor a storage or infrastructure role: describe a module you owned end to end, a hard production problem you debugged in it, how you found the root cause, and what you changed so…
    Last asked Jan 2026
  • Topological sort of a directed graphCodingReturn an order of a directed graph's nodes in which every edge goes from earlier to later, or report a cycle. Give Kahn's algorithm and the DFS version. Only the title of this…
    Last asked Jan 2026
  • Next greater palindromeCodingYou are given a string n holding a positive integer in decimal, with no leading zeros. It can be hundreds of digits long, so it may not fit in any built-in integer type. Return…
    Last asked Jan 2026
  • Shard a large input embedding table across devicesML designA model's V, H input embedding table is too big for one device. Compare sharding along the vocabulary with sharding along the hidden dimension: how a lookup works in each, the…
    Last asked Jan 2026
  • Shard an LM head and combine the logitsML designThe output layer maps a hidden state through an H, V weight matrix to vocabulary logits. Compare splitting the weight by vocabulary with splitting it by hidden dimension: what…
    Last asked Jan 2026
  • Distance from every node to the cycleCodingA connected graph contains exactly one cycle. For every node, return its distance to the nearest node on the cycle. Find the cycle by trimming leaves, then run a multi-source BFS…
    Last asked Jan 2026
  • Design email ranking and summarization for an inboxAI systemDesign features that rank a user's incoming email by importance and summarize messages and threads with a language model. Cover signals for ranking, training labels, the…
    Last asked Jan 2026
  • Infer a user's intent from their typing in real timeML designAs a user types into an assistant or search box, predict what they intend to do so the product can respond early. Cover labels and data, features from partial input, the model and…
    Last asked Jan 2026
  • Make LLM output match a word processor's formattingAI systemA writing assistant inside a word processor generates text that must fit the document's formatting: styles, headings, lists, tables. Design how you get the model to produce…
    Last asked Jan 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 Jan 2026
  • Rotate a 3x3 grid of digits by 180 degreesCodingRotate a 3x3 grid of digits by 180 degrees and return the result, in place if you can. Only the title of this report was public.
    Last asked Jan 2026
  • Validate a JSON-like stringCodingWrite a validator that decides whether a string is well-formed JSON-like text: balanced braces and brackets, quoted keys, commas and colons in the right places, valid values…
    Last asked Jan 2026
  • Redundant connection in a directed graphCodingA rooted tree had one extra directed edge added. Given the edge list, return the edge to remove so the rest is a rooted tree again, taking the last such edge in the input when…
    Last asked Jan 2026
  • Transformers and the challenges of deploying LLMsML designExplain how a Transformer works, then discuss recent advances in large language models, how you would apply one in the team's product, and the main problems with deploying LLMs in…
    Last asked Dec 2025
  • Longest palindromic subsequenceCodingReturn the length of the longest subsequence of a string that reads the same forwards and backwards. Give the interval dynamic programming and its O(n^2) time.
    Last asked Dec 2025
  • A recent innovation you deliveredBehavioralDescribe something new you recently built or introduced: the problem it solved, why your approach was new for the team, how you got it adopted, and its measurable impact.
    Last asked Dec 2025
  • Count errors in a log stream with a moving averageSystem designDesign a component that reads a continuous stream of log lines, counts errors per time window and keeps a moving average to spot spikes. Discuss windowing, memory bounds, late or…
    Last asked Dec 2025
  • Debug performance problems in a distributed systemSystem designA distributed service has become slow. Walk through how you find out why: metrics, tracing and logs, finding the slow component, common causes (hot partitions, lock contention…
    Last asked Dec 2025
  • Design a cloud console's main page after sign-inSystem designDesign what happens when a user signs in to a cloud service's console and the main page is built: authentication, loading the resources the user may see, permission checks, audit…
    Last asked Dec 2025
  • Longest substring without repeating charactersCodingReturn the length of the longest substring with no repeated character, with a sliding window that remembers the last index of each character.
    Last asked Nov 2025
  • My calendar: book without double bookingCodingBuild a calendar whose book(start, end) accepts a half-open interval only if it does not overlap any existing booking. Compare a list scan with a sorted structure and binary…
    Last asked Nov 2025
  • Count pairs with 1/x + 1/y = 1/NCodingGiven a positive integer N up to about a million, count the ordered pairs of positive integers (x, y) with 1/x + 1/y = 1/N. Show that the count equals the number of divisors of…
    Last asked Nov 2025
  • 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 Nov 2025
  • Merge k sorted arraysCodingMerge several sorted arrays into one sorted array with a min-heap holding one element from each array. Give the O(N log k) cost and compare with pairwise merging.
    Last asked Oct 2025
  • Mutexes, memory alignment, polymorphism and idempotencyCodingA fully technical round of short questions: what a mutex guarantees and how to use one correctly, memory efficiency and why the compiler aligns and pads structures, how runtime…
    Last asked Oct 2025
  • Reverse nodes in k-groupCodingReverse a linked list in groups of k nodes, leaving a final group shorter than k as it is. Do it in place with O(1) extra space.
    Last asked Oct 2025
  • Design tic-tac-toeOO designModel an N-by-N tic-tac-toe game for two players: moves, turn order, and detecting a win or draw efficiently after each move.
    Possibly retired
  • Subsets, with and without backtrackingCodingReturn every subset of a set of distinct numbers using backtracking, then write it again iteratively, without backtracking, by building subsets up or using bit masks. Reported in…
    Possibly retired
  • Count the words in a documentCodingGiven the text of a document, return how many words it contains. The real work is the definition: agree with the interviewer what counts as a word (is "it's" one word or two, what…
    Possibly retired
  • Sum of the longest run of positive numbersCodingAn array holds positive and negative numbers. Find the longest contiguous run of positive numbers and return its sum (decide and state how ties between equally long runs are…
    Possibly retired
  • Assign node labels to maximize the total edge sumCodingYou are given an undirected graph with n nodes numbered 0 to n - 1 and a list edges, where edgesi = a, b is an edge between nodes a and b. Give every node a label so that the…
  • Build the longest spike from an arrayCodingA spike is a sequence of integers that strictly increases up to a single peak and then strictly decreases. The peak belongs to both parts, and either part may be empty, so a…
  • Compress an n-ary tree by promoting childrenCodingEach node of an n-ary tree holds a unique integer value and an ordered list of children. You are given the root and a list compressednodes of values. Implement compress(root…
  • 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 recipes a pantry can coverCodingYou keep a pantry of ingredients, written as a string pantry. Each character is one unit of an ingredient, so "aab" holds two units of a and one unit of b. You also have a list of…
  • Count valid 24-hour times from four digitsCodingWrite a function countvalidtimes(a, b, c, d) that takes four digits (each an integer from 0 to 9). Arrange all four digits as HH:MM on a 24-hour clock, using each given digit…
  • 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…
  • Design a hotel booking systemSystem designSearch hotels by place and dates, show availability and prices, and book rooms without double-booking, including holds and cancellations.
  • 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.
  • 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.
  • 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 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.
  • 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.
  • 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 Amazon LockerSystem designLet customers pick a locker location at checkout, assign a compartment that fits the package, and give them a code to collect it within a few days.
  • 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 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.
  • 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.
  • 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…
  • 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…
  • Finish times for round-robin tasksCodingA single worker processes a list of tasks. Task i needs arri hours of work in total. The tasks wait in a queue in index order. Each turn, the worker takes the task at the front…
  • First occurrence or floor index in a sorted arrayCodingYou are given an array nums of integers sorted in non-decreasing order. It may contain repeated values. You are also given an integer target. Implement searchfirstorfloor(nums…
  • Gift delivery scheduler with limited agentsCodingYou are planning gift deliveries to employees in an office. The workday runs from hour 9 to hour 17. You get: - intervals, a list of start, end pairs with integer hours. Employee…
  • 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…
  • Integer to English words, built up by rangeCodingWrite a function that spells out an integer in English words. The interviewer adds the ranges in parts, and later parts should reuse earlier ones, so design for extension from the…
  • Largest number by changing up to k digits to 5CodingYou are given a string s that holds a positive integer (digits only, no leading zero) and an integer k. In one operation you pick any digit of s that is not 5 and change it to 5…
  • Largest square from 1x1 and 2x2 tilesCodingYou have M small tiles of size 1×1 and N large tiles of size 2×2. Build the largest possible square: every cell of the square must be covered by exactly one tile, with no gaps, no…
  • 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 palindrome from equal-length wordsCodingYou are given a list of words. Every word has the same length k and uses lowercase letters. The list can contain duplicates. Pick some of the words (possibly none) and join them…
  • Longest proper prefix that is also a suffixCodingGiven a string s, return the length of the longest string that is both a proper prefix and a proper suffix of s. - A prefix is a run of characters at the start of s; a suffix is a…
  • Longest substring without three repeats in a rowCodingGiven a string s, return the length of the longest substring of s in which no character appears three or more times in a row. Call such a substring semi-alternating: runs of one…
  • Maximum tests in one activation windowCodingA shared test environment receives test cases over time. You are given an integer array arrivalTime, where each entry is the time one test case arrives. Several test cases can…
  • Merge two n-ary trees by child positionCodingImplement mergetrees(root1, root2). It takes the roots of two n-ary trees and returns the root of a new tree that merges them. Each node has an integer val and an ordered list…
  • Merge two sorted arrays into distinct valuesCodingTwo integer arrays, nums1 and nums2, are each sorted in non-decreasing order and may contain repeated values. Return one array, sorted in ascending order, that contains every…
  • 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…
  • Minimum adjacent swaps to group red ballsCodingA row of balls is given as a string balls. Each character is 'R' (red) or 'W' (white). In one move you may swap two neighbouring balls. Return the minimum number of moves needed…
  • Minimum swaps to put evens before oddsCodingGiven an integer array nums of length n, you want every even value to come before every odd value. In one move you may swap the values at any two distinct indices. Return the…
  • Recent file tracker with date and insertion orderCodingImplement a FileStorageSystem class that records files and answers two kinds of listing queries. - storefile(file: str, date: str) - None records a file with its storage date…
  • 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…
  • 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…
  • Set an even-parity bit in a byte's MSBCodingBytes sent over a noisy link often carry a parity bit so the receiver can detect a flipped bit. In this scheme the parity bit is the most significant bit (bit 7, value 128) and…
  • Spell a word on a 5-column letter boardCodingA text-entry device shows the 26 lowercase letters on a board 5 columns wide, filled row by row. Letter c sits at row (ord(c) - ord('a')) // 5 and column (ord(c) - ord('a')) % 5:…
  • Window with the most copies of a target valueCodingImplement mosttargetwindow(nums, targetindex, windowsize). The target value is numstargetindex. Look at every contiguous subarray of nums with exactly windowsize elements. Return…