practice a little every day — you've got this ♡
Coding Interview Problems
Practice 6002 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.
- 6002
- Problems
- 2223
- Auto-graded
- 15
- Topics
- 273
- Added today
Showing 2191–2220 of 2776 results
- Stacks & QueuesHardAuto-gradedPeak Tower Configuration with Height Limits
Construct a sequence that rises then falls while respecting per-element caps, maximizing the sum using greedy peak selection and monotonic stacks.
Stacks & Queuesmonotonic-stackgreedyprefix-sum - Trees & GraphsMediumAuto-gradedDetect Cycles in a Package Dependency Graph
Tests ability to detect cycles in a directed graph using DFS-based cycle detection, modelling package dependencies where a cycle makes installation impossible.
Trees & Graphsgraphscycle detectiondepth-first searchtopological order - Dynamic ProgrammingMediumAuto-gradedCount Tile-Filling Combinations for a Target Length
Tests unbounded-knapsack DP by counting unordered multisets of tile widths, drawn from a given list, that sum exactly to a target corridor length.
Dynamic Programmingdynamic-programmingcombinatoricsunbounded-knapsack - Arrays & HashingMediumAuto-gradedSeven-Segment Display 180° Rotation Symmetry
Determine if a sequence of seven-segment digits appears identical when the entire display is flipped upside down.
Arrays & Hashingarrayssimulationmapping - Heaps, Sorting & SearchMediumAuto-gradedKth Element in Union of Two Sorted Lists
Tests ability to find the kth smallest element from two sorted arrays using binary search on partition counts rather than merging.
Heaps, Sorting & Searchbinary-searcharraystwo-pointers - 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 - Stacks & QueuesMediumModel answerStack Trace Event Stream from Periodic Samples
Convert a sequence of call stack snapshots into function entry and exit events with configurable debouncing to filter transient frames.
Stacks & Queuesstacksarrayssimulationstate-machine - StringsMediumModel answerFive Python Fundamentals: Iteration, Collections, and Edge Cases
Write five short functions covering string repetition, list transformation, FizzBuzz, word counting, and finding the second-largest unique integer.
Stringspythonfundamentalsedge-cases - 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 DesignHardModel answerIn-Memory Transaction Ledger with Aliases and History
Implement a timestamped in-memory ledger supporting deposits, cashback transfers, scheduled execution, account merging with alias resolution, and point-in-time balance queries.
Data Structure Designunion-findheapbinary-searchsimulation - Data Structure DesignMediumModel answerConstant-Time Range Queries and Stack with Maximum Tracking
Implement two data structures: one supporting fast interval sum queries on a fixed array, and a stack that efficiently tracks and removes its maximum element.
Data Structure Designprefix-sumstackheapdata-structures - 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 - Data Structure DesignMediumModel answerMaintaining a Random Sample from a Stream of Unknown Length
Implement a data structure that keeps k randomly chosen items from a stream where you don't know the total count ahead of time.
Data Structure Designreservoir-samplingstreaming-algorithmsrandomized-algorithms - 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 - Arrays & HashingMediumModel answerProportional Stratified Sampling with Largest Remainder Allocation
Sample records from grouped data while preserving stratum proportions, using the largest remainder method to allocate exact counts and seeded random selection.
Arrays & Hashingsamplinggroupinghash-tablerandomization - 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 - Trees & GraphsMediumModel answerRobot Grid Exploration with Limited Sensing API
Navigate a robot through an unmapped grid with obstacles using only movement and turn commands to locate a target cell.
Trees & Graphsdfsbacktrackinggraph-traversalsimulation - Trees & GraphsHardModel answerShortest Path for a Hobbled Xiangqi Horse on a 10×9 Board
Find the minimum moves for a Chinese-chess horse to reach a target on a 10×9 grid, accounting for the leg-blocking movement restriction and obstacle squares.
Trees & GraphsBFSgraph traversalboard gamesshortest path - 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