practice a little every day — you've got this ♡
Coding Interview Problems
Practice 6021 original coding, SQL, system design, machine learning and behavioral problems across 15 topics. Coding and SQL problems run against hidden test cases right in your browser; every problem has hints and a worked solution, free.
- 6021
- Problems
- 2229
- Auto-graded
- 15
- Topics
- 272
- Added today
Showing 931–960 of 2782 results
- Data Structure DesignMediumAuto-gradedRisk-Ranked Alert Queue Simulator
Simulate a priority queue of alerts that serves the highest risk first and the oldest first on ties, driven by a list of Put and GetNext commands.
Data Structure Designpriority-queueheapdesignsimulation - Trees & GraphsMediumModel answerSame-Host Link Crawler: Sequential and Concurrent Versions
Crawl every page reachable from a seed URL on the same host, ignoring URL fragments, first with one thread and then with a thread-safe parallel design.
Trees & Graphsbfsgraph-traversalconcurrencythread-pool - Arrays & HashingEasyAuto-gradedScreening a Vendor Identity-Check Response
Validate a nested vendor response with strict type checks, then apply ordered business rules to return the first failing reason code.
Arrays & Hashingvalidationhash-maptype-checkingsimulation - Math & Bit ManipulationEasyAuto-gradedMin Comparisons to Determine Top Two Elements
Calculate the theoretical minimum number of comparisons needed in the worst case to locate both the largest and second-largest elements among N items.
Math & Bit Manipulationmathsortingalgorithms - Arrays & HashingMediumAuto-gradedNext Lexicographic Ordering Plus Left-to-Right Calculator
Rearrange an array in place into its next lexicographic ordering, and evaluate a parenthesis-free arithmetic string with truncating division, both in linear time.
Arrays & Hashingnext-permutationtwo-pointersexpression-parsingin-place - StringsEasyAuto-gradedParse Hex Color Code to ARGB Integer
Parse a hex color string (6 or 8 characters) into a 32-bit ARGB packed integer, returning a fallback on invalid input.
Stringsstringsparsingmath-bits - Arrays & HashingMediumModel answerCode Review Drill: Three Pandas Helpers in a Data Pipeline
Explain what three short pandas helper functions do, then propose and justify improvements to their correctness, speed, readability, robustness and testability.
Arrays & Hashingpythonpandascode-reviewvectorization - Data Structure DesignHardAuto-gradedSimulate a Time-Aware Financial Ledger
Process sequential financial operations with scheduled transfers, account merging, historical snapshot queries, and activity rankings using heaps and binary search.
Data Structure Designdesign-dsheaps-sortingarrays - Data Structure DesignMediumModel answerImplement Dynamic Bitwise Masking and Uniform O(1) Set
Construct an XOR string transformation function alongside an expected constant-time randomized container structure.
Data Structure DesignArraysHash MapBit ManipulationDesign - Heaps, Sorting & SearchMediumAuto-gradedFinal Departure From a Bouncing Convoy on a Road
Find when the last vehicle leaves a segment and which one it is, when equal-speed vehicles reverse on contact, using pass-through equivalence and order preservation.
Heaps, Sorting & Searchsortingsimulation-shortcutghost-particlesordering-invariant - Data Structure DesignMediumAuto-gradedFrozen-View Integer Set with Independent Cursors
Simulate a mutable integer set whose iterators capture the set's contents at creation time and stay isolated from later changes and from each other.
Data Structure Designdesignhash-setiteratorsnapshot - Data Structure DesignMediumModel answerBuild a Persistent Key-Value Shell with Tests and CI
Design a single-class interactive key-value shell that saves to disk, handles bad input, logs errors, accepts new commands easily, and ships with unit tests, a README, and CI.
Data Structure Designoopcliunit-testingpersistence - Heaps, Sorting & SearchMediumAuto-gradedFind Boundary Indices in Sorted Sequence
Adapt binary search to locate the starting and ending index of a target value in a sorted sequence in logarithmic time.
Heaps, Sorting & Searchbinary-searcharrayssearching - Arrays & HashingEasyAuto-gradedDot Product of Two Run-Length Encoded Vectors
Compute the dot product of two run-length encoded integer vectors by walking both run lists together, without expanding them into full arrays.
Arrays & Hashingtwo-pointersrun-length-encodingsimulation - StringsEasyModel answerFind Unique Words Across Two Text Blocks
Identify words that appear in either of two given text strings, but not in both, using symmetric set difference.
Stringsstringsarraysset-operations - Trees & GraphsMediumAuto-gradedFollow Graph: Following Lists and Mutual-Count Suggestions
Answer batched queries on a static directed follow graph: list direct followees and rank second-hop accounts by how many followees also follow them.
Trees & Graphsgraphhash-mapadjacency-listsorting - Arrays & HashingEasyAuto-gradedCalculate Mean and Variance for the Sum of Two Variables
Compute the expected value and total variance of the combined sum of two random variables given their individual means, variances, and covariance.
Arrays & Hashingstatisticsprobabilitymath - Stacks & QueuesMediumModel answerBuild a Multi-Room Async TCP Chat Server
Implement a concurrent, room-based TCP chat server in Python using asyncio, featuring command processing, scoped broadcasts, backpressure handling, and strict resource cleanup.
Stacks & Queuesconcurrencyasyncionetworkingpython - StringsEasyAuto-gradedLongest Streak of a Repeated Character in a String
Scan a string once to find the longest streak of adjacent equal characters, keeping separated streaks distinct and using only constant extra memory.
Stringsstringstwo-pointerslinear-scanstate-tracking - Data Structure DesignMediumAuto-gradedStateful Banking System Ledger Engine
Simulate an in-memory banking ledger that processes chronologically ordered operations involving balances, leaderboards, delayed cashbacks, and account merges.
Data Structure Designdesign-dsheaps-sortingarrays - Greedy & IntervalsMediumModel answerPeak Overlap Point, Bounded BST Sums, and Call-Stack Self Time
Three separate tasks: find an integer with the highest interval overlap, sum BST values within a range (plus many-query speedups), and compute per-function self time from nested start/end logs.
Greedy & Intervalssweep-linebstprefix-sumsstack - Data Structure DesignHardModel answerExpiring Resource Credit Ledger with Out-of-Order Events
Design an in-memory compute credit ledger handling expiring grants, usage subtractions with earliest-expiration priority, out-of-order event ingestion, and point-in-time balance queries.
Data Structure Designdesign-dsheaps-sortinggreedy-intervalsarrays - Data Structure DesignMediumModel answerReconcile Cached Coverage Status with Out-of-Order Checks
Build a reconciler that keeps a cached insurance status correct when verification results arrive late, duplicated, or as failures, and that can rebuild the status from full history.
Data Structure Designidempotencyout-of-order eventscache consistencystate reconciliation - Trees & GraphsMediumAuto-gradedColumn-by-Column Readout of a Binary Tree from Level-Order Input
Group binary tree nodes by horizontal column, ordering each column by depth and then by value, with the tree given as a level-order list with nulls.
Trees & Graphsbinary-treebfssortingcoordinates - Arrays & HashingMediumAuto-gradedResolve Callable Names from Argument Type Lists
Match call argument types against registered signatures, some with a trailing repeatable parameter, and return the sorted names of every signature that fits each call.
Arrays & Hashinghashingstringsvariadic-matchingprefix-keys - Dynamic ProgrammingHardAuto-gradedCount and Score Conflict-Free Cap Distributions
Count the ways to give each person a distinct acceptable item and find the best total value, using a bitmask DP over people or bounded backtracking.
Dynamic Programmingbitmask-dpcountingbacktrackingassignment - Math & Bit ManipulationEasyAuto-gradedExpected Transit Wait Time with Stochastic Delays
Computes the expected waiting time for a passenger arriving at a random moment at a stop with probabilistic bus delays.
Math & Bit Manipulationmathprobabilitystatisticsexpected-value - Math & Bit ManipulationMediumAuto-gradedOptimal Warehouse Placement to Minimize Total Delivery Distance
Find the minimum cumulative Manhattan distance from a single target point to all target locations in a 2D grid.
Math & Bit Manipulationarraysmathsortinggrid - Trees & GraphsMediumAuto-gradedCheapest Dungeon Escape Through Monster Cells
Find the minimum number of monster cells entered on any route from start to exit in a grid with walls, using a weighted shortest-path search such as Dijkstra or 0-1 BFS.
Trees & Graphsgriddijkstrashortest-path0-1-bfs - Data Structure DesignMediumAuto-gradedCall-Signature Cache with Least-Recently-Used Eviction
Simulate a fixed-capacity LRU cache keyed by a call's positional and keyword arguments, with order-insensitive, type-aware key matching.
Data Structure Designlru-cachehash-mapdoubly-linked-listcanonical-keys