Coding Interview Questions
114 interview questions in our bank cover Coding, most of them Coding Questions. They average 2.8/5 difficulty — medium — and each one was reported by a candidate after a real interview. Companies known to ask about Coding: Google, Amazon, Capital One, ByteDance, Oracle, and 15 more.
Practice these on the problems board →Companies that ask about Coding
Question mix
- Coding Questions113
- Mobile Engineering (Android/iOS)1
Difficulty
- 1/5 — warm-up6
- 2/5 — easy26
- 3/5 — medium72
- 4/5 — hard10
Coding questions at Google
HTTP Router with Path Parameters
3/5A coding question on building the routing layer of a web server: routes are registered once, then incoming URLs must be resolved to the correct handler, with some routes capturing named path segments. It tests what happens when two routes could both match and how lookup recovers when a first choice fails.
Coding QuestionsGoogleHorizontal Cut That Halves the Area of Rectangular Cakes
3/5A coding question about slicing a collection of axis-aligned rectangles with a single straight line so that both sides hold equal total area. The answer must be precise when several lines qualify, and the follow-up asks for a method whose cost does not grow with how spread out the rectangles are.
Coding QuestionsGoogleEnumerate All Strings of 1s and 2s with a Given Digit Sum
2/5A coding question about generating every sequence built from two small symbols that meets an exact total, then reasoning about how large the result can get. It tests recursive enumeration, ordering of the output, and how to size the work by what is produced rather than by what is searched.
Coding QuestionsGoogleServer Distances Avoiding Failed Servers and Their Radius
3/5A coding question on a network of servers where some have failed and a failure also takes down its surroundings. Compute minimum hop counts from a start server to every server that can still be reached safely.
Coding QuestionsGoogleDesign an Ad Service That Rotates by Score
3/5A coding question that asks you to build a small service which stores scored advertisements and serves one on each request. The service has to keep serving the best ad while following a fairness rule between consecutive requests, and to behave sensibly when little is available.
Coding QuestionsGoogleCount Triples with Matching Letter Sets on Both Sides
4/5A coding question about counting pairs of neighbouring substrings of a lowercase string that are made of exactly the same letters. The input is long enough that checking every pair of pieces directly is too slow, so the count has to come from structure in the string.
Coding QuestionsGoogleFill a Template with %KEY% Placeholders
2/5A coding question on filling in a text template from a dictionary of named values. Precise rules decide what happens with unknown names, stray symbols and values that look like placeholders themselves.
Coding QuestionsGoogleMerge Overlapping Shifts into an On-Duty Schedule
3/5A coding question about turning a list of overlapping work shifts into one timeline. For every stretch of time you report who is on duty, including stretches where nobody is, and you must decide carefully what happens at the edges of each shift.
Coding QuestionsGoogleMerge Two Sequences Preserving Each Order
3/5A coding question on combining two integer sequences into one list with no repeated values while keeping the relative order inside each sequence. It asks whether a merge exists, when it is unique, and how to get the lexicographically smallest one.
Coding QuestionsGoogleMost Squares Covering One Grid Cell
3/5A coding question about square regions laid over a large map of cells: find how many regions stack up on the busiest cell, and in a follow-up report the count for every cell, with up to a hundred thousand regions on a thousand-by-thousand map.
Coding QuestionsGoogleDeduplicate Log Messages and Return Them in Timestamp Order
3/5A coding question about removing repeated entries from an event record and returning what remains in time order. It probes careful reading of which copy to keep, deterministic ordering when times collide, and an incremental version where entries show up one by one and must be handed out earliest first.
Coding QuestionsGoogleMaximum Value With a Unit-Weight Capacity
2/5A coding question about choosing items of limited supply to maximise total value when only a fixed number of items fit. Huge counts, a very large cap, non-positive values and exact big-integer totals are the edge cases that matter.
Coding QuestionsGoogleMaximum Subarray Endpoint Score
3/5A coding question on scoring contiguous ranges of an integer list by rewarding the two end values and penalizing the values between them. It asks for the best achievable score, its location with a defined tie rule, and a strict linear-time, constant-space budget.
Coding QuestionsGoogleFind the Highest-Rated Similar Movie
1/5A coding question on selecting one movie from a rated collection while honoring a deterministic rule when ratings are tied. It tests precise handling of ordering, negative values, and singleton inputs.
Coding QuestionsGoogle
Coding questions at Amazon
Streaming Task Scheduler with Cancellation and a Simulated Clock
3/5A design-style coding question on a deterministic job queue: jobs arrive continuously, each due at its own moment, and the structure must release them in the right order while callers may withdraw a job before it fires. It tests tie ordering, reused identifiers and keeping memory bounded under heavy churn.
Coding QuestionsAmazonMedianFinder: Running Median of a Number Stream
4/5A coding question about a collection that keeps growing while a statistic of its contents must be available after every insertion. Naive re-sorting is too slow at the stated call volume, so the work is choosing a structure that keeps just enough order. Two range-restricted variations ask how the design adapts when values are bounded.
Coding QuestionsAmazonEmployee Total Cost Calculator with Lookup Tables
3/5An object-oriented design task in Python: model people and pricing tables, then combine several table-driven charges into one figure. The care goes into how the tables are keyed, how fractions of a cent are rounded, and what a missing entry does.
Coding QuestionsAmazonStocked Fulfillment Centers Within a Route Limit
3/5A coding question on a network of sites joined by two-way links. Given one site that needs supplies, list the other sites that hold stock and lie close enough to it, where closeness is counted in hops along the shortest connection.
Coding QuestionsAmazonLongest Run of Healthy Servers After One Fixed-Length Repair
3/5A coding question on a log of working and broken machines in a row, where one repair of a fixed length can be applied or skipped. The task is to find the longest unbroken stretch that can be achieved.
Coding QuestionsAmazonCount Idle Robots
2/5A coding question on a warehouse grid of robots, where you decide which robots stand alone. It checks how you model positions, treat repeated entries, and keep the work linear for large inputs.
Coding QuestionsAmazonLexicographically Largest Identifier
3/5A coding question about building an identifier from a lowercase string by repeatedly taking one letter and discarding everything on one side of it. The learner returns the largest identifier in dictionary order that the process can produce, for strings up to one hundred thousand letters.
Coding QuestionsAmazon
Coding questions at Capital One
Branch with the most pushed files from a command log
1/5A short simulation exercise built on a text log that mimics a source-control session. You replay the entries in order while tracking which line of work is active and tally what lands on each one, then name the winner. The interesting parts are choosing a tie rule, handling logs that never record any contribution, and rejecting malformed sequences.
Coding QuestionsCapital OneEvaluate arithmetic equations from parallel arrays
1/5An easy warm-up coding task on validating many small sums and differences stored position by position across several lists. Each position carries an operator symbol that decides how its numbers combine before being compared with an expected value. The point is clean single-pass iteration and deciding how unexpected operator symbols are reported.
Coding QuestionsCapital OneCount arithmetic triplets in a multiset after each query
3/5A data-structure exercise where a collection of integers changes over time and, after every change, you must report how many evenly spaced groups of three it contains. Repeated values multiply the count, and one kind of change wipes out every copy of a value. The goal is updating the answer incrementally from local information rather than rescanning everything.
Coding QuestionsCapital OneReorder a String Alternating From Both Ends
2/5A short string-manipulation coding question about building a new ordering of a text from its two ends. It checks that you handle both even and odd lengths, avoid duplicating or dropping the middle character, and keep the work linear even for very long inputs.
Coding QuestionsCapital OneDeal Out Win, Draw, Loss Results in Repeating Rounds
2/5A string coding question about regrouping a sequence of three kinds of outcomes into a repeating pattern. The tricky part is what happens once one kind is used up while others remain, and doing it without repeatedly searching and deleting from the text.
Coding QuestionsCapital One
Coding questions at ByteDance
Merge Overlapping Closed Intervals
3/5A coding question on combining ranges of numbers that share any point into the fewest possible ranges. It checks careful handling of ranges that merely meet at an end, ranges nested inside others, input given in no particular order, and results that must come back in ascending order.
Coding QuestionsByteDanceWord Ladder: Shortest Transformation Sequence
4/5A coding question on determining how many words, including the starting and target endpoints, belong to the shortest permitted chain, with zero for an unreachable target.
Coding QuestionsByteDanceAll Paths Lead to the Destination
3/5A coding question about validating whether every possible route through a directed graph finishes at one required endpoint. The tricky cases include alternate terminal nodes and routes that never terminate.
Coding QuestionsByteDanceMaximum-Weight Independent Set in a Graph
4/5A coding question about selecting the most valuable compatible group of vertices from a small undirected graph. It tests careful handling of conflicts, negative values, disconnected inputs, and deterministic ties.
Coding QuestionsByteDanceAttend All Meetings Without Conflicts
2/5A coding question about checking a schedule of time ranges for clashes. It tests how a candidate treats ranges that merely touch and ranges given in no particular order.
Coding QuestionsByteDance
Coding questions at Oracle
Message Logger with a Chain of Handlers
2/5A coding question on object-oriented design: build a logger that sends each message through an ordered, extensible list of components. It checks interface choice, ordering rules and how messages change as they pass along.
Coding QuestionsOracleFlatten Parentheses in a Plus-Minus Expression
3/5A coding question on rewriting an arithmetic expression of single-letter variables, signs and nested brackets into an equivalent flat form. Getting the sign of every variable right at any depth is the core, and very deep nesting rules out naive recursion.
Coding QuestionsOracleCount Dropped Requests Under Three Rate Limits
3/5A coding question on sorted request times and several overlapping time-window quotas. The challenge is defining exactly which earlier requests count toward each quota, then computing the answer faster than checking all history for every request.
Coding QuestionsOracleShortest Substring to Delete for Distinct Characters
3/5A coding question on deleting one contiguous block from a lowercase string so the characters that remain are all different. It asks for the shortest such block.
Coding QuestionsOracleTwo-Stack FIFO Queue with Amortized O(1) Operations
2/5A data-structure design question about building a first-in, first-out container on top of last-in, first-out storage only. It tests keeping arrival order correct when additions and removals interleave, handling the empty case cleanly, and arguing why the average cost per call stays constant even when one call is expensive.
Coding QuestionsOracle
Coding questions at Confluent
Phrase search over multiple documents
3/5A search-engine style coding round: given a collection of texts, report which ones contain a term, which ones contain a set of terms, and which ones satisfy a combination of terms joined by a single kind of boolean connective. Fast repeated queries call for preprocessing the collection into a lookup structure.
Coding QuestionsConfluentSudoku validator and solver
2/5A classic grid puzzle in two parts: first decide whether a partly filled 9 by 9 board breaks any row, column or box rule, then complete it or report that no completion exists. Many boards have several answers, so a good solution is judged on legality and on keeping the given digits, not on one fixed grid.
Coding QuestionsConfluentPairwise Modulo Checksum: Sum of i mod j + j mod i up to n
3/5A math-flavoured coding question: add up a remainder-based score over every pair of numbers in a range that can reach one million. It tests whether you can find structure in how remainders behave and count the total far faster than checking each pair, while keeping the arithmetic exact.
Coding QuestionsConfluentCount Unordered Ways to Reach a Total Weight Using Parts 1 to k
3/5A coding question on counting how many distinct collections of small weights add up to a target, where reordering the same weights does not create a new answer. Results grow very quickly, so the count is reported modulo a large prime, and the main trap is counting one collection more than once.
Coding QuestionsConfluent
Coding questions at Apple
Collapsible Tree View With +/- Toggle State
2/5A coding question that models a familiar user-interface widget as plain data: a nested hierarchy whose branches open and close, and a text listing of what a user would currently see. It checks careful state handling when ancestors close and reopen, controls pressed on rows that are out of view, childless entries and bad identifiers.
Coding QuestionsAppleTwo-Color an Undirected Graph (Bipartite Check)
3/5A coding question on undirected graphs given as a list of pairs: can the vertices be split into two groups with every connection crossing between groups? It probes care with graphs made of several separate pieces, isolated vertices, repeated pairs and vertices joined to themselves, at a size where a deep call stack is not an option.
Coding QuestionsAppleDecode a Run-Length String With Optional Counts
2/5A coding question on string parsing: expand a compact letter-and-count encoding back into plain text. It checks multi-digit and zero counts, letters without a count, and how the decoder reacts to input that breaks the format.
Coding QuestionsAppleFood Rating System
3/5A coding question about maintaining changing ratings for named items grouped into categories. It tests a multi-operation class API, exact update behavior, and deterministic selection when several items share the best score.
Coding QuestionsApple
Coding questions at Microsoft
Count Subarrays with Equal Even and Odd Counts
3/5A coding question about a list of integers, some negative: the learner returns how many contiguous, non-empty stretches hold as many even values as odd ones. Stretches are told apart by where they start and end, lists can hold up to a hundred thousand values, and the total can exceed what a 32-bit integer stores.
Coding QuestionsMicrosoftMinutes Until Every Fresh Cell Spoils
3/5A coding question about a grid of empty cells, fresh produce and spoiled produce, where spoilage passes to side-adjacent fresh pieces once per minute. The learner returns how many minutes go by before nothing fresh is left, or -1 when some fresh piece is out of reach, on grids up to two hundred by two hundred.
Coding QuestionsMicrosoftCount Subarrays Whose Product Has an Odd Number of Divisors
4/5A coding question that asks you to count the contiguous slices of an array whose product has an odd number of positive divisors, with values up to 200 and arrays of 200,000 elements. The products are too large to compute, so the task is to reason about what the divisor condition means for the factors.
Coding QuestionsMicrosoftMaximum Valid Team of Overlapping Employees
3/5A coding question about scheduling employees whose working hours are closed intervals. You choose the biggest group in which a single member's hours intersect everyone else's, under input sizes that rule out comparing every pair.
Coding QuestionsMicrosoft
More Coding questions
Detect a Cycle in a Linked List
1/5An introductory linked-list round question about a chain of nodes that might loop back on itself. You report whether the structure ever revisits a node, under a strict memory budget that rules out remembering every node seen. It rewards knowing why comparing values is wrong, and how two references moving at different rates can settle the question.
Coding QuestionsSalesforceMerge Two Sorted Linked Lists Into One In Place
1/5A staple linked-list exercise: two chains that are each already in order must become one ordered chain. Success depends on reusing the existing nodes rather than building new ones, on resolving equal values in a defined order, and on handling the case where one input runs out before the other.
Coding QuestionsSalesforceMatch-3 Grid: Find Matches, Clear and Drop
3/5A coding question on simulating a tile-matching puzzle grid. You scan the board for straight lines of identical tiles, report each with its length in a fixed order, then clear them and let the remaining tiles fall. It tests measuring whole lines rather than fragments and tiles that belong to two lines at once.
Coding QuestionsRobloxRanked-Choice Voting (Instant Runoff)
3/5Simulate a preferential voting system frequently discussed in engineering interviews at LinkedIn. This algorithmic challenge involves tracking multi-round ballot preferences, systematically eliminating underperforming candidates, and redistributing votes until a clear majority emerges. The exercise examines your ability to manage complex state transitions, handle tie-breaking edge cases, and write robust simulation code. Review the complete specification, structural requirements, and optimized source code by obtaining a full subscription.
Coding QuestionsLinkedInToken-List Calculator (+, -, *, /)
3/5A coding question on evaluating an arithmetic expression that arrives as a list of tokens, without calling a built-in evaluator. It covers addition and subtraction, then multiplication and division that bind tighter than the other operators, integer division that truncates toward zero, and a clear error on division by zero.
Coding QuestionsCollegeVineBabysitter Quote with Time-of-Day Rate Bands
2/5A coding question on pricing an evening of child care when the hourly rate changes with the time of day. It tests careful handling of awkward inputs: shifts that cross midnight, schedules that wrap around the clock, overlapping or incomplete rate bands, and invalid times that must be rejected rather than priced.
Coding QuestionsUpstartLongest Suffix-Prefix Overlap of Two Strings
3/5A coding question on comparing the end of one string with the start of another and returning the length of the longest match. It checks direction, repeated characters and empty inputs, and asks how to keep the running time linear for long inputs.
Coding QuestionsCrestaPath Existence in Directed and Undirected Graphs with a Blocked Edge
3/5This Figma interview question evaluates your graph traversal skills by requiring you to handle multiple reachability queries under varying conditions, such as directed links, undirected connections, and dynamically blocked pathways. Testing your proficiency with advanced search algorithms and data structure updates, this problem assesses how well you adapt traversal logic on the fly. Access to the comprehensive problem breakdown and optimal model solution requires a subscription.
Coding QuestionsFigmaMapReduce Map and Reduce Functions for Top-K Values Per Key
3/5A coding question on writing the map, shuffle and reduce steps of a small batch job that reports each key's largest values. It checks bounded memory on a stream that can be read only once, repeated values, short groups, and a request for zero values.
Coding QuestionsDatabricksJob Tree Total Cost and Top Root Jobs
3/5A coding question on a tree of jobs linked by which job launched which. You roll each job's duration up into the total cost of its subtree, then compare the top-level jobs, pick a winner with a fixed tie-break rule and report the third-ranked total. Very deep nesting must be handled without overflowing the call stack.
Coding QuestionsCollegeVineFind Duplicate Files Without a Library Walker
3/5A coding question about locating files whose contents are identical inside a nested directory tree that is exposed only through small accessor functions. The interesting parts are choosing a cheap filter before touching expensive data, and keeping the traversal safe on very deep trees.
Coding QuestionsSnapchatLongest Path in an Undirected Tree (Edge-List Diameter)
3/5A coding question about an acyclic connected network described by its links: how many links lie on the longest route between any two of its points? It checks whether a candidate can reason about where such a route must end, avoids assuming it passes through a particular point, and copes with long chain-shaped inputs without running out of stack.
Coding QuestionsQualcommCount Distinct Values in a Sorted Array When K Is Small
3/5A coding question on a sorted list that holds a huge number of repeated entries but only a handful of different ones. You count the different entries while reading far fewer elements than the list contains, then reason about when that saving stops paying off.
Coding QuestionsMetaContainer with insert and popRandom
3/5A data-structure design question about a collection that stores distinct values and can return a uniformly chosen member while deleting it. It is about combining two structures so that lookup, insertion, and uniform sampling with removal all stay constant time, and keeping their bookkeeping consistent.
Coding QuestionsMetaLast String Before It Becomes Empty Under Repeated Alphabetical Removals
3/5A coding question about a lowercase string that is trimmed in repeated passes, one letter at a time. You must report the text that remains just before it disappears, for inputs far too long to replay pass by pass.
Coding QuestionsFlexportMemory Card Game State Model with Flip-Back on Mismatch
3/5A coding question about the logic behind a classic concentration game: turning cards over two at a time, deciding whether a pair agrees, and putting a wrong pair back out of sight. It checks exact handling of clicks that must do nothing, when a wrong pair is hidden, and how to keep each click cheap on a large board.
Coding QuestionsMomentMaximum Area of an Island in a Grid
3/5A coding question on a map stored as a grid of land and water cells. You measure the biggest landmass without altering the input, then redo it in a way that holds up on very large maps.
Coding QuestionsFlexportSequential Order Submission with Retries
3/5A coding question about building a small manager that submits requests to an unreliable service one after another. Requests must keep their arrival order, failed ones are attempted again a limited number of times, and results may arrive immediately or later.
Coding QuestionsRobinhoodWiki Hopper: List Every Page Reachable by Links
3/5A graph traversal coding question about collecting every page of a linked site that a reader can reach from one starting page. It stresses loops between pages, repeated links, very long chains and a stable result order, and the discussion then turns to making the exploration concurrent.
Coding QuestionsSnowflakeMerchant Payout Schedule with Hold Days
2/5A coding question about scheduling money transfers: given recurring payout dates, decide which date each payment belongs to and report one combined total per date. It extends from a single schedule to per-account schedules and then to a waiting period before payments become eligible.
Coding QuestionsStripeActive Motion Periods Across Camera Streams
3/5A coding question about turning noisy sensor readings into clean spans of time, and then combining several sensors so that only moments shared by all of them remain. It tests careful boundary handling for closed spans, including spans that touch at one instant, and clean merging of sorted lists.
Coding QuestionsServalCount Servers With No Requests in a Time Window
3/5A coding question about counting, for each of several query times, how many servers were idle during a fixed-length inclusive time window given a log of requests. It stresses handling large inputs, duplicate requests and window boundaries.
Coding QuestionsIBMSort Topic Names by Prefix and Numeric Suffix
2/5A coding question on ordering labels that combine a text prefix with a number, where plain alphabetical sorting puts ten before two. It tests building a multi-level ordering from parsed parts, breaking ties between different spellings of the same number, and handling numbers of any size.
Coding QuestionsPerplexityWord Dictionary with Add and Exact Search
3/5A coding question on a small data-structure class that stores words and answers lookups quickly even when many words begin alike. A follow-up asks a related question about word beginnings.
Coding QuestionsCoupangArray-Backed Set Without Built-in Collections
2/5Implement a small collection class that keeps distinct values and supports adding, looking up and deleting them, with each operation reporting whether anything changed. It checks duplicate handling, equality across mixed value types and consistent state after repeated deletions.
Coding QuestionsOdeSpreadsheet with Live Formula Cells
3/5A coding question on building a small grid of cells that hold text, numbers or arithmetic formulas over other cells. The difficulty is keeping every formula consistent when something it reads is edited later, and handling what happens when a formula cell is overwritten.
Coding QuestionsRampNearest Elevator That Can Serve a Passenger
2/5A coding question on dispatching: given vehicles at positions with a travel state and a request with a direction, pick the best one that can legitimately respond. It tests careful case analysis of which candidates are eligible, plus a deterministic tie-break.
Coding QuestionsPinterestTotal Length of Words Buildable from a Letter Supply
2/5A coding question on checking which words in a list can be spelled from a limited collection of letter tiles, where a tile may be used only once per word. The answer is the combined length of the words that work.
Coding QuestionsTabaPayTwo Robots, Two Delivery Blocks: Maximum Total Payment
3/5A coding question about selecting two separate stretches of fixed length from a row of non-negative numbers so their combined total is largest. It rewards care with the left-to-right order of the two stretches, choices that crowd each other out, and inputs with no valid choice, then asks how the idea extends to more stretches.
Coding QuestionsNuroDesign a Follow Graph and a Ten-Post Feed
3/5A coding question that asks you to build a small in-memory social service where people publish short messages and subscribe to one another. The task centres on returning a bounded, newest-first timeline efficiently and on the rules around subscribing and unsubscribing.
Coding QuestionsPinduoduoCount Complete Highway Journeys from Toll Booth Logs
2/5A coding question on analysing event logs from a road network. Each text line records a vehicle passing a checkpoint, and you decide how many full trips appear in the data when events of many vehicles are mixed together and some records are incomplete or out of sequence.
Coding QuestionsOnePayGIF Catalog Pagination by Tag
2/5A coding question on turning a flat list of packed records into a filtered, de-duplicated and paged view. It tests careful handling of order, exact-match rules and page boundaries.
Coding QuestionsSoFiWeighted LRU Cache
3/5A coding question on a memory-bounded key-value store where every entry has its own cost and old entries are discarded by recency. It tests careful bookkeeping of a running total through inserts, in-place updates and repeated removals, along with clear handling of invalid input.
Coding QuestionsDatabricksIn-Memory File Store with Unique Names and Sequential IDs
3/5A coding question on designing a small in-memory service that stores named blobs of data. You decide how identifiers are issued, how clashing names are resolved, and what happens after removals, while keeping lookups and listings consistent.
Coding QuestionsCrestaNearest Fire Station Distance for Every Residential Cell
3/5A coding question on a city map with fire stations, impassable lakes and homes. For each home, the task is to report how far the closest station is when trucks may only move up, down, left or right, and to mark homes that no station can reach.
Coding QuestionsLinkedInFind Nodes With Enough Free GPUs for a Pod
2/5A coding question about a cluster of machines that each have a fixed number of accelerators and some workloads already running. Given a new workload's requirement, you work out which machines still have room and how much, returning them in their original order.
Coding QuestionsTogether AIPrioritized Task Listing with Sub-task Ordering
3/5Build a task-list class that hides finished, assigned and repeated tasks and prints the rest in a precise priority order, with ties broken by several rules. A second method then places sub-tasks before or after their parent depending on due dates, at any nesting depth.
Coding QuestionsMetaFormat an Integer with Thousands Separators
2/5A coding question on writing an integer with a comma after every three digits, counted from the right, with negative numbers and arbitrarily large values handled. The grouping has to be built by hand rather than with a formatting built-in.
Coding QuestionsHudson River TradingChoose Checkout Coupons under a Loyalty-Point Budget to Maximize Savings
4/5A coding question on deciding which store coupons to activate when each one costs loyalty points and only a fixed allowance of points is available per purchase. The aim is the largest total saving, where savings follow stacking rules, a per-line limit and cent rounding.
Coding QuestionsPalantirRemove All Nodes With Duplicate Values From a Sorted Linked List
3/5A coding question on linked lists: from a sorted chain of nodes, remove every value that appears more than once, keeping no copy of it at all. The tricky cases are when the head itself must go and when nothing remains, and it tests careful pointer handling without extra storage.
Coding QuestionsArista NetworksIn-memory workspace credit system with transfers, scheduling and merge
3/5A multi-level design exercise on an in-memory ledger: workspaces hold credit, money moves instantly or on a timetable, and two workspaces can be folded into one. The core difficulty is keeping time-triggered work correctly ordered, cancellable and consistent whichever operation arrives next, and getting rankings with stable tie-breaking right.
Coding QuestionsAirbnbMinimize the Sum of Distinct Counts Across All Prefixes
2/5A coding question about rearranging repeated integers so that a cumulative score over prefixes is as small as possible. It tests whether the candidate can turn a global ordering objective into a compact computation while handling ties and extreme multiplicities correctly.
Coding QuestionsGoldman SachsImplement a Least Frequently Used Cache
4/5A coding question about a bounded key-value store that ranks entries by how often they are used and resolves ties consistently. It tests multi-part class design and careful maintenance of several interacting invariants.
Coding QuestionsAnt InternationalImplement a Least Recently Used Cache
3/5A coding question about a bounded key-value store whose eviction choice changes after successful reads and writes. It tests class design, precise update behavior, and efficient state maintenance across a long operation sequence.
Coding QuestionsAnt InternationalEnumerate All Tic-Tac-Toe Games from a Board
3/5A coding question about generating every valid completion of a small two-player board game. It tests precise handling of alternating turns, terminal outcomes, move ordering, and complete result construction.
Coding QuestionsIvoText Editor with Cursor Movement
3/5A coding question on modelling a text-editing buffer with a cursor. You support inserting and deleting characters, then extend the design so the cursor can move left, right, up and down across lines of different lengths. It tests choosing a representation that keeps those moves simple and handling every boundary cleanly.
Coding QuestionsDatologyAIImplement Two Methods in an Android Stock Trading System Skeleton
3/5Tackling this mobile engineering exercise from Robinhood requires you to complete a stock trading application skeleton written in Java and Kotlin. You will need to implement specific core methods that manage order lifecycle states, account balances, and position updates without breaking any existing public interfaces. This assessment gauges your command of object-oriented design principles and domain-driven development within an Android ecosystem. Access the comprehensive requirements, system architectural overview, and verified model solution by upgrading to a paid subscription.
Mobile Engineering (Android/iOS)RobinhoodLFU Cache (Full Implementation)
4/5A coding question on building a fixed-size key-value cache that evicts by how rarely a key is used, with recency breaking ties. Every operation must run in constant average time, and updates, misses and re-inserted keys follow precise rules.
Coding QuestionsNVIDIABest Time to Buy and Sell Stock with at Most k Transactions
4/5A coding question on choosing trade dates from a daily price series to maximize profit when the number of trades is capped.
Coding QuestionsOptiverCode Editor Folding with Brace Matching and Preserved Nested Fold State
3/5An object-design coding question about the collapse and expand feature of an editor for curly-brace code: pair up block boundaries, then keep the displayed text correct as blocks are toggled. It tests whether inner blocks remember being collapsed when an outer block is closed and reopened, and whether rendering stays linear.
Coding QuestionsJane StreetStack-Language Interpreter and Jump-Debugging Program Rewriter
3/5A coding question on a small stack language whose values are strings and whose programs can branch. You execute such programs, then rewrite them to print a debug value before each unconditional branch without changing the interpreter, keeping every branch destination correct after instructions shift.
Coding QuestionsJane StreetMaximum Subarray Sum With Edge Cases
3/5A coding question on arrays: find the largest sum of any contiguous stretch of an integer list. It tests inputs that trip up quick answers, such as lists made only of negative values, a single element, zeros, very large numbers and an empty list, and how each case should be reported.
Coding QuestionsUpstartTopological Order of Dependent Jobs (Course Schedule)
3/5A coding question on ordering tasks that depend on one another. Given prerequisite pairs, the candidate must return a deterministic valid order, prefer the smallest job number whenever there is a choice, and report when the constraints cannot all be met.
Coding QuestionsNetflixSales Tax Owed per State from Transactions and Tax Authorities
2/5A coding question on computing sales tax owed to three US states from a list of sales and a table of regional tax authorities. It tests falling back to a postcode lookup when the state is missing, taxing only the items each authority covers, subtracting credits and refunds, and rounding just once per state.
Coding QuestionsSphereMerge All Overlapping Intervals
3/5A coding question on combining a list of closed ranges on the number line into the fewest disjoint ranges covering the same points. The learner returns them in increasing order and has to deal with ranges meeting at a single end point, ranges nested inside others, and single-point ranges.
Coding QuestionsFractal AnalyticsCoding Problem 1 (1D Dynamic Programming)
3/5This interview task reported at Squarepoint challenges candidates to build an efficient optimization or counting algorithm using linear sequential programming techniques. It evaluates your ability to break down complex state transitions and manage sequential computations effectively. The complete problem statement, constraints, and expert-written model solution require a subscription.
Coding QuestionsSquarepointGrocery Checkout Coupons with Category Stacking and a Discount Cap
3/5A coding question on producing receipt totals for a shopping cart when percentage coupons can target single products or whole categories and can combine on the same line. Each line's saving is limited, and every amount has to come out exact to the cent.
Coding QuestionsPalantirAll Ways to Split a Digit String into Strictly Increasing Numbers
3/5A coding question about a long string of numerals that you may chop into consecutive chunks. You list every chopping in which the chunks, read as numbers, keep growing, with special treatment for chunks that begin with a zero. It tests careful recursion, handling of edge cases and the order in which results are produced.
Coding QuestionsTemuExpected Number of Adjacent Picks in a Random Subset
2/5A probability question posed as code: numbers on a line are sampled at random and you report the exact average count of neighbouring numbers that were both sampled. The answer must be an exact reduced fraction and must work for inputs far too large to try every outcome.
Coding QuestionsSIGCompare Two Three-Card Poker Hands
2/5A coding question about comparing two fixed-size card hands under a complete category and tie-break specification. It tests careful rule translation, representation choices, and exact handling of special rank sequences and ties.
Coding QuestionsOpenAIDrain a Node and Reschedule Its Pods
3/5A coding question about taking a machine out of a cluster and moving all of its workloads elsewhere, where every workload has a size, machines have limited room and nothing can be split. You must return a valid new layout whenever one exists and report failure otherwise, and discuss why simple heuristics can give wrong answers.
Coding QuestionsTogether AIMove the N-th Node of a Singly Linked List to the Front
1/5An easy pointer-manipulation coding exercise on a singly linked list. Given a position counted from the start, you take that node out and place it at the head while everything else stays in the same sequence. Interviewers look for a single traversal with constant memory, correct handling of the first and last positions, and relinking in the right order so no cycle appears.
Coding QuestionsLinkedInMinimum Conference Rooms for a Day's Schedule
3/5A coding question on scheduling shared resources for a set of time ranges. It tests how a candidate counts demand at the busiest moment and handles ranges that merely touch.
Coding QuestionsGoldman SachsMulti-Head Self-Attention in NumPy (Batched)
3/5An ML coding exercise on building a batched sequence-mixing layer from four learned matrices. It checks tensor reshaping and numerical stability on large inputs.
Coding QuestionsTikTokMinimum Road Score on a Trip Between Two Cities
3/5A coding question about a network of cities joined by weighted two-way roads. Paths may reuse roads and cities, and you find the lowest road weight that any trip between the two end cities can be forced to include.
Coding QuestionsVisaEnumerate Separate Target-Sum Regions
4/5A coding question about finding regions of a nonnegative matrix and returning every compatible pair in deterministic order. It tests exhaustive result construction, exact boundary semantics, and scalability when many candidates exist.
Coding QuestionsWisdomAI
Studied alongside
Coding interview FAQ
- How many Coding interview questions are there?
- 114 reported questions, mostly Coding Questions.
- Which companies ask Coding questions?
- Google (14), Amazon (7), Capital One (5), ByteDance (5), Oracle (5), Confluent (4), Apple (4), Microsoft (4).
- How hard are Coding questions?
- They average 2.8 out of 5: 6 at 1/5, 26 at 2/5, 72 at 3/5, 10 at 4/5.