practice a little every day — you've got this ♡
Coding Interview Problems
Practice 6000 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.
- 6000
- Problems
- 2221
- Auto-graded
- 15
- Topics
- 273
- Added today
Showing 1651–1680 of 2121 results
- Math & Bit ManipulationMediumAuto-gradedObserver Simulation and Manual Integer Conversion
Tests event-driven simulation optimization and precise numeric string formatting including signed 32-bit boundary handling.
Math & Bit Manipulationsimulationmathstring-manipulation - Arrays & HashingMediumAuto-gradedGroup and Rank Users by Average Value
Tests efficient grouping and aggregation over dictionaries, plus multi-key sorting to produce ordered output.
Arrays & Hashingaggregationdictionariessorting - Arrays & HashingEasyAuto-gradedFilter and Sort Items by Embedding Similarity Score
Tests vector scoring with dot products, stable sorting with tie-breaking, and set-based filtering of excluded indices.
Arrays & Hashingarrayssortingfiltering - Arrays & HashingMediumAuto-gradedSuffix Maximum Frequency Count
Computes how many times the largest element appears in each suffix of an array using a single backward scan.
Arrays & Hashingarrayssuffix-queriessingle-pass - Trees & GraphsHardAuto-gradedReduce Worst-Case Coverage Gap with One New Relay Node
Tests binary search on answer combined with multi-source BFS and 2D prefix sums to optimally place one relay node and minimize the maximum Chebyshev coverage distance.
Trees & Graphsbinary-searchbfsmatrixprefix-sums - Linked ListsMediumAuto-gradedInterleave Two Linked Lists by Position Parity
Tests pointer manipulation and node reordering by splitting a singly linked list (given as an array) into odd- and even-indexed sublists and merging them in a specific interleaved pattern.
Linked Listslinked listspointer manipulationreorderingarray simulation - Data Structure DesignMediumAuto-gradedSimulate a Nested Tic-Tac-Toe Game with Board-Routing Rules
Tests state management for a two-layer game board with recursive win detection and dynamic move constraints based on previous plays.
Data Structure Designsimulationgame-theorystate-machine - Data Structure DesignMediumAuto-gradedDuplicate Linked List and Simulate LRU Cache Operations
Tests linked list deep copying with arbitrary pointers and implementing an LRU cache with O(1) operations using hash maps and doubly-linked lists.
Data Structure Designlinked-listshash-mapdesignpointers - Arrays & HashingEasyAuto-gradedRank Nearest Neighbors by Mean Squared Error
Tests k-nearest neighbors search with distance computation, NULL handling, and top-k selection with tie-breaking.
Arrays & Hashingsimilaritydistance-metricsrankingdata-processing - Data Structure DesignEasyAuto-gradedSimulate a Bounded LRU Cache with Get/Put Operations
Tests the ability to simulate a fixed-capacity LRU cache by processing a sequence of get/put operations and collecting all get results in order.
Data Structure Designdata structurescachesimulation - Trees & GraphsMediumAuto-gradedAxis-Aligned Bounding Boxes of Grid Regions
Tests BFS/DFS connected-components traversal on a 2D grid to locate distinct filled regions and compute the tightest enclosing rectangle for each.
Trees & Graphsbfsdfsconnected-componentsgrid - Trees & GraphsMediumAuto-gradedShortest Path Through a Grid With Keys and One-Way Portals
Tests BFS/Dijkstra on an augmented state space where position must be combined with a key-collection bitmask, and directional arrow tiles enforce constrained traversal.
Trees & Graphsbfsdijkstrabitmaskgrid - Heaps, Sorting & SearchHardAuto-gradedSelect Best Available Venues by Ranking Criteria
Tests filtering, multi-level sorting with custom tie-breaking rules, and efficient top-K selection from structured data.
Heaps, Sorting & Searchsortingfilteringheappriority-queue - Data Structure DesignMediumAuto-gradedKey-Value Store Operation Simulator
Tests ability to use hash maps for constant-time operations and handle state transitions in a key-value store simulation.
Data Structure Designhash-mapsimulationdata-structures - Heaps, Sorting & SearchEasyAuto-gradedCombine Multiple Sorted Lists into a Single Sorted Sequence
Tests divide-and-conquer merging and two-pointer techniques to efficiently combine many pre-sorted lists.
Heaps, Sorting & Searchdivide-and-conquertwo-pointersmerging - Greedy & IntervalsMediumAuto-gradedSingle Buy-Sell Stock Gain
Tests finding the maximum profit from one purchase and one sale in a price sequence using a single-pass greedy approach.
Greedy & Intervalsgreedyarrayssliding-window - Data Structure DesignMediumAuto-gradedHistorical Key-Value Store with Time-Based Retrieval
Tests your ability to build a versioned data store supporting efficient historical lookups through binary search on sorted timestamps.
Data Structure Designbinary-searchhash-mapdata-structures - Trees & GraphsMediumAuto-gradedLexicographically Smallest Schedule or Detect a Deadlock
Tests Kahn's algorithm with a min-heap to produce the lexicographically smallest valid processing order across nodes in a directed dependency graph, or detect a cycle.
Trees & Graphstopological-sortgraphsheap - Arrays & HashingMediumAuto-gradedZero-Sum Triplets in an Array
Tests two-pointer technique on sorted arrays, duplicate avoidance, and quadratic complexity optimization for finding triplet combinations.
Arrays & Hashingtwo-pointerssortingarray-traversal - Data Structure DesignHardAuto-gradedSliding-Window Event Counter with a Circular Bucket Buffer
Design a fixed-memory event counter using a ring buffer of per-second buckets that tracks how many events fell inside a trailing 15-minute window.
Data Structure Designring-buffersliding-windowdesignsimulation - Trees & GraphsMediumAuto-gradedSpell Words Along Connected Paths in a Letter Grid
Tests backtracking DFS with trie-based pruning to find all words from a large list that can be traced through edge-adjacent, non-repeating cells in a 2-D letter grid.
Trees & Graphsbacktrackingtriedfs - Arrays & HashingMediumAuto-gradedSliding Window Average over an Integer Sequence
Tests whether a candidate can compute consecutive fixed-width window averages in O(n) time by maintaining a running sum instead of recomputing each window from scratch.
Arrays & Hashingsliding-windowarraystwo-pointers - StringsMediumAuto-gradedText Substitution with Whole-Word Match and Longest-Prefix Priority
Apply a phrase-to-replacement map on the original text in one pass, respecting whole-word boundaries and preferring longer matches.
Stringstriegreedystring-matching - Stacks & QueuesMediumAuto-gradedLexicographically Smallest Digit Sequence from Rise/Fall Pattern
Tests greedy thinking and stack-based reversal to build the smallest digit string satisfying a sequence of increase and decrease constraints.
Stacks & Queuesgreedystackstrings - StringsEasyAuto-gradedScale Serving Sizes in a Shopping List
Tests careful string parsing: multiply only the leading numeric token in each line while leaving the rest of the text exactly as-is.
Stringsstringsparsinglist manipulation - StringsHardAuto-gradedDetect a Contiguous Block Inside an Integer Sequence
Tests the ability to determine whether one integer array appears as an unbroken, in-order block inside a larger array using linear-time pattern matching.
StringsKMPpattern matchingarrayssubsequence - Arrays & HashingMediumAuto-gradedCollect Characters by Walking a Grid
Tests grid traversal with directional commands, run-length encoding, and boundary/obstacle validation.
Arrays & Hashingmatrixsimulationstring-building - Trees & GraphsMediumAuto-gradedFind Valid Completion Sequence for Dependent Tasks
Tests understanding of topological sorting, dependency graph modeling, and cycle detection in directed acyclic graphs.
Trees & Graphstopological-sortgraphsbfscycle-detection - Greedy & IntervalsMediumAuto-gradedMaximize Pay by Filling Gaps in a Shift Schedule
Tests greedy reasoning and run-based reformulation to optimally spend a limited number of schedule changes for maximum earnings with streak bonuses.
Greedy & Intervalsgreedydynamic-programmingarrays - Data Structure DesignMediumAuto-gradedCart History: Undo and Redo Item Changes
Design a cart with reversible add/remove operations, tracking change history with undo/redo stacks.
Data Structure Designdata-structuresstackstate-management