practice a little every day — you've got this ♡
Coding Interview Problems
Practice 6008 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.
- 6008
- Problems
- 2226
- Auto-graded
- 15
- Topics
- 273
- Added today
Showing 691–720 of 2780 results
- Data Structure DesignMediumAuto-gradedRate-Limited Dispatcher: Which Requests Fire and When
Simulate a rate limiter with a fixed lockout window that keeps only the newest waiting request, using event-driven processing and a precise rule for requests landing exactly at window end.
Data Structure Designsimulationevent-driventhrottletwo-pointers - StringsEasyAuto-gradedName the CSS Function for Red-Green-Blue With Optional Alpha
Recall which CSS color function takes red, green and blue channels plus an optional opacity value, and return its canonical name as a string.
Stringscssfundamentalstriviastring-return - Trees & GraphsMediumModel answerBuild a Display Order for Tasks with Dedup, Filtering and Subtasks
Turn a flat batch of scheduler tasks into a display list: merge duplicates, hide finished work, order by priority, and keep each subtask right under its parent.
Trees & Graphssortinghashingtree-traversalcycle-detection - Data Structure DesignMediumAuto-gradedProcess LFU Cache Operations with Frequency and Recency Eviction
Simulate a Least Frequently Used (LFU) cache supporting fast O(1) operations, breaking tie frequencies by least recent usage.
Data Structure Designdesign-dsarrayshash-table - Greedy & IntervalsMediumAuto-gradedLargest Group Anchored by One Overlapping Interval
Find the largest set of intervals that all intersect one chosen anchor interval, using sorting and binary search to beat quadratic time.
Greedy & Intervalsintervalsbinary-searchsortingcounting - Data Structure DesignMediumAuto-gradedRunning Median Tracker Over an Operation Log
Process a log of insert and query operations on an integer stream, returning the current median for each query, using two heaps for efficient updates.
Data Structure Designheaptwo-heapsstreamingmedian - Trees & GraphsMediumModel answerDistributed Tree Traversal and Reliable Neighbor Messaging Protocol
Design a reliable message passing protocol across adjacent tree nodes, then compute total network size and discover paths under network faults.
Trees & Graphstrees-graphsdistributed-systemsmessage-passingnetwork-protocol - Trees & GraphsMediumModel answerModeling Classic Puzzles: River Crossing, Jugs, and Proofs
Turn a set of contest-style logic puzzles, led by the fox-chicken-grain river crossing, into formal models, and give algorithms with proofs of correctness and optimality.
Trees & Graphsbfsstate-space-searchinvariantsproofs - Data Structure DesignMediumAuto-gradedSubscription Filter Matching with Ordered Delivery
Simulate a message router that matches nested JSON events against per-queue filter policies and returns matching queues in first-subscription order.
Data Structure Designdesignhash-mapjsonsimulation - Heaps, Sorting & SearchEasyAuto-gradedFind the Slot for a Value in a Sorted List of Distinct Integers
Tests explicit binary search on a sorted array: find a value's index or the position where it would be inserted, in logarithmic time.
Heaps, Sorting & Searchbinary-searchsorted-arrayarraystwo-pointers - Data Structure DesignMediumAuto-gradedPath-Keyed File Store with Per-User Storage Quotas
Simulate a command stream on an in-memory file store with admin and user-owned files, prefix/suffix search, copying, and quota-driven eviction.
Data Structure Designhash-mapsimulationsortingdesign - Arrays & HashingMediumModel answerDistance-to-Go Along Batched 2D Routes
Given a batch of 2D routes, compute for each waypoint the length of the remaining route to the final waypoint, in linear time, handling short and empty inputs.
Arrays & Hashingsuffix-sumnumpyvectorizationeuclidean-distance - Trees & GraphsMediumAuto-gradedPrune a Branch from a Parent-Array Forest
Remove a node and its entire subtree from a forest stored as a parent array, either by marking slots with -1 or by compacting indices and remapping parent pointers.
Trees & Graphsforestdfsparent-arrayreindexing - Arrays & HashingMediumAuto-gradedWaiting-Time Triangle Density: Normalize and Evaluate the CDF
Normalize a piecewise-linear triangular density to find its constant, then evaluate the resulting piecewise-quadratic cumulative distribution at a list of query points.
Arrays & Hashingprobabilitycdfpiecewise-functionsintegration - Trees & GraphsMediumAuto-gradedDeterministic Mine Grid Plus Letter-Path Check
Build a mine-count grid with mines in row-major order, then use DFS backtracking to check whether a word can be traced through a separate letter grid.
Trees & Graphsgridbacktrackingdfssimulation - Data Structure DesignMediumAuto-gradedPer-User Request Throttle Simulator with Rolling Time Window
Replay a list of throttle operations and decide, per user, whether each request fits within k accepted requests in a rolling window of t ms, using inclusive boundary rules.
Data Structure Designsliding-windowdequehash-mapsimulation - Dynamic ProgrammingMediumAuto-gradedSmallest Sentence from a Spaceless String and Word List
Segment a spaceless string into dictionary words and return the lexicographically smallest valid sentence, or None if impossible; tests suffix DP plus greedy reconstruction.
Dynamic Programmingdynamic-programmingstringsgreedyword-break - Arrays & HashingEasyAuto-gradedRepair a Sensor Log: Merge, Sort, and Interpolate Gaps
Merge duplicate timestamps by averaging known readings, sort, then fill missing values by linear interpolation inside gaps and nearest-value holding at the ends.
Arrays & Hashinghash-mapsortinginterpolationtime-series - Data Structure DesignMediumModel answerObject Model and Move Engine for a Sliding-Tile Merge Game
Design the classes and core move algorithm for a configurable N x N sliding-tile merge puzzle, with testable randomness, win and loss detection, and room for undo.
Data Structure Designobject-oriented-designgame-logicsimulationdependency-injection - StringsMediumAuto-gradedDoes This Shorthand Describe the Word?
Check whether a shorthand of letters and skip counts exactly describes a word, handling multi-digit counts, leading zeros, overruns and leftover characters with a two-pointer scan.
Stringstwo-pointersstring-parsingsimulation - Data Structure DesignMediumAuto-gradedWord Index with Prefix Queries and Ordered Suggestions
Simulate a command sequence on a word index that supports insert, exact lookup, prefix lookup, and alphabetically ordered, capped autocomplete, built on a trie.
Data Structure Designtriedesigndfsstrings - Data Structure DesignEasyAuto-gradedLedger Simulator with Holds, Deferred Payments and Cancellations
Simulate a small in-memory bank driven by a command script, covering account creation, instant and deferred transfers, batch settlement and cancellation of pending transfers.
Data Structure Designsimulationhash-mapstate-managementclass-design - Data Structure DesignMediumModel answerBuild an Expiring LRU Cache with an Injectable Clock
Design a fixed-capacity cache with least-recently-used eviction and per-entry expiry, and justify your data structures, tests and complexity.
Data Structure Designlru-cacheordereddictttlunit-testing - Stacks & QueuesEasyAuto-gradedCheck Whether Bracket Pairs Are Correctly Nested
Decide whether a string of round, square and curly brackets is well formed, which tests the use of a stack for last-in-first-out matching.
Stacks & Queuesstackstringsparsing - Math & Bit ManipulationEasyAuto-gradedSingle Row of the Binomial Triangle in Linear Space
Compute one row of Pascal's triangle by index, using only space proportional to the row, via an in-place update or the multiplicative binomial recurrence.
Math & Bit Manipulationpascal-trianglecombinatoricsdynamic-programmingarrays - Math & Bit ManipulationHardModel answerBalanced Character Rewriting and Offline Grid Threshold Queries
Solve parity-based string transformation via bitmasks and handle offline 2D range count queries using dynamic point-update data structures.
Math & Bit Manipulationbit-manipulation2d-fenwick-treesweep-lineprefix-sum - Data Structure DesignMediumModel answerHow Hash Tables Handle Collisions, Deletes, and Growth
Walk through hash table internals: index mapping, chaining versus linear probing, safe deletion, load-factor resizing, and when operations degrade from O(1) to O(n).
Data Structure Designhash-tablecollision-resolutionlinear-probingload-factor - Stacks & QueuesMediumModel answerTroubleshooting Silent Execution in Python Async Workflows
Analyze and fix a Python async script that finishes silently without invoking its async functions, and explore concurrent execution options with asyncio.
Stacks & Queuespythonasyncioconcurrencydebugging - Data Structure DesignHardModel answerBoolean Condition Trees for a Spending Policy Checker
Design a data-driven policy engine whose rules combine field checks with nested AND, OR and NOT, covering representation, validation, missing-field behavior and explainable results.
Data Structure Designexpression-treerules-enginevalidationboolean-logic - Trees & GraphsMediumAuto-gradedTally Separate Clusters of Occupied Cells in a Grid
Count groups of orthogonally touching '1' cells in a character grid, a connected-components task solved with an iterative flood fill or union-find.
Trees & Graphsgraphbfsgridconnected-components