practice a little every day — you've got this ♡
Coding Interview Problems
Practice 5991 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.
- 5991
- Problems
- 2219
- Auto-graded
- 15
- Topics
- 270
- Added today
Showing 2371–2400 of 2770 results
- Arrays & HashingMediumAuto-gradedSubarrays with Odd Zero Frequency
Tests understanding of prefix parity tracking and combinatorial counting to efficiently solve subarray problems.
Arrays & Hashingprefix-sumtwo-pointersmath - Trees & GraphsMediumAuto-gradedFilter Users by Active Connection Threshold
Tests graph maintenance with dynamic edge insertion and deletion, proper handling of duplicates and missing edges, and final degree counting.
Trees & Graphsgraphshash-tablesimulation - StringsMediumAuto-gradedMinimum Edit Distance Between Two Palindromes
Tests understanding of edit distance (insert, delete, substitute) by computing the minimum operations needed to transform one palindrome into another, reinforcing dynamic programming on strings.
Stringsstringsdynamic programmingedit distancepalindromes - Math & Bit ManipulationEasyAuto-gradedCalculate Weight in a Nested Balanced Mobile System
Tests systematic application of balance constraints in a multi-level mobile where equal-arm bars divide weight evenly.
Math & Bit Manipulationalgebrarecursionmathlogic - Greedy & IntervalsMediumAuto-gradedCombine Overlapping Intervals
Tests interval merging through sorting and linear scanning, focusing on edge-case handling for touching and nested ranges.
Greedy & Intervalsintervalssortingarrays - Trees & GraphsMediumAuto-gradedMinimum-Length Root-to-Leaf Path with Target Sum
Tests tree traversal with state tracking to identify the shortest valid path satisfying a sum condition.
Trees & Graphsbinary-treedfspath-finding - Math & Bit ManipulationEasyAuto-gradedDigital Root via Modular Arithmetic
Tests understanding of modular arithmetic by computing the digital root of a large integer without repeatedly summing digits in a loop.
Math & Bit Manipulationmathmodular arithmeticnumber theory - Data Structure DesignMediumModel answerArea-Weighted Random Point Sampling Across Multiple Squares
Design a class for uniform random point sampling inside a square, then extend it to sample uniformly from the union of N non-overlapping squares.
Data Structure Designprobabilityprefix-sumssamplinggeometry - Trees & GraphsMediumAuto-gradedSignal Propagation Time to All Destinations
Tests understanding of multi-source BFS to compute the longest shortest path from any source to all required destinations on a grid with obstacles.
Trees & Graphsbreadth-first-searchgridmulti-source-bfsshortest-path - Arrays & HashingHardAuto-gradedSurvey Gender Distribution Probability
Compute probabilities of observing specific gender counts in survey samples under binomial and hypergeometric models.
Arrays & Hashingprobabilitystatisticscombinatorics - Arrays & HashingHardAuto-gradedClassify Queries by Nearest Reference After Linear Transform
Tests vectorized linear projection, pairwise distance computation, and nearest-neighbor selection with tie-breaking.
Arrays & Hashingmatrix-operationsdistance-metricsvectorization - Arrays & HashingMediumAuto-gradedCount Contiguous Segments Summing to K
Tests efficient subarray counting using prefix sum differences tracked in a hash map.
Arrays & Hashingprefix-sumhash-mapsubarray - Arrays & HashingMediumAuto-gradedFour Utility Functions: Crop, Softmax, Gaussian, Triangle
Tests array slicing, numerical stability in exponential calculations, 2D kernel generation, and geometric inequality validation in a single bundled function.
Arrays & Hashingmathnumerical-methodsgeometry - Data Structure DesignHardModel answerBuild an Idempotent Financial Account System
Create an in-memory account manager that enforces balance rules, prevents duplicate processing via transaction IDs, and detects conflicting retries.
Data Structure Designfinancial-systemsidempotencydata-structuresstate-management - Heaps, Sorting & SearchHardAuto-gradedBuild a Min-Heap and Schedule Tasks by Priority
Construct a working min-heap from scratch, then apply it to schedule dependent tasks in lexicographic order while detecting cycles.
Heaps, Sorting & Searchheaptopological-sortgraphdata-structures - Data Structure DesignHardAuto-gradedTime-Versioned Key-Value Storage
Implement a data structure that stores versioned values by timestamp and retrieves the most recent version at or before a query time.
Data Structure Designbinary-searchhash-mapdata-structures - Data Structure DesignMediumAuto-gradedProcess Account Transaction Sequence
Tests ability to implement stateful operations on indexed data with validation, edge-case handling, and multiple operation types.
Data Structure Designsimulationvalidationstate-management - Trees & GraphsMediumModel answerWeighted Grid Navigation: Minimum Cost Path Around Walls
Find the cheapest path through a cost-weighted grid containing impassable walls, returning the total cost and route, or -1 if no path exists.
Trees & Graphsdijkstrapriority-queueshortest-pathgrid - Data Structure DesignHardModel answerDesign a Thread-Safe Resource Pool with RAII Handles
Build a concurrent object pool in C++ that safely manages reusable resources with blocking acquisition, automatic return via RAII, and graceful shutdown.
Data Structure Designconcurrencyc++raiithread-safety - Math & Bit ManipulationMediumAuto-gradedBalanced Digit Sum Across All Bases
Tests understanding of base conversion by summing digits of a number across every base from 2 to b and checking whether each base yields a digit sum equal to a target value.
Math & Bit Manipulationmathbit manipulationbase conversion - Data Structure DesignMediumAuto-gradedCompute Dot Products for Memory-Efficient Integer Vectors
Tests efficient sparse data representation using hash maps and optimizing operations by focusing on non-zero elements only.
Data Structure Designhash-mapsparse-dataoptimization - StringsEasyAuto-gradedCount Distinct Words in a Sentence
Tests the ability to tokenize a raw sentence string into normalized word tokens and count how many distinct words appear exactly once.
Stringsstringstokenizingparsing - Heaps, Sorting & SearchMediumAuto-gradedMinimize the Maximum Delivery Time Across Routes
Tests binary search on the answer combined with greedy feasibility checking to minimize the maximum delivery time when assigning parcels to couriers.
Heaps, Sorting & Searchbinary searchgreedysorting - StringsEasyAuto-gradedCount Distinct Morse Code Representations
Tests string encoding with a fixed mapping, hashing for deduplication, and understanding that identical encodings can arise from different inputs.
Stringshash-setstring-manipulationencoding - Greedy & IntervalsMediumAuto-gradedMaximum Concurrent Reservations
Calculate the peak number of overlapping time intervals to determine minimum resource capacity.
Greedy & Intervalsintervalssweep-linesorting - Trees & GraphsMediumAuto-gradedLowest Shared Ancestor in Organization Hierarchy
Finding the deepest node that lies on the upward path to the root for all given employees in a tree structure.
Trees & Graphstreelowest-common-ancestordepth-first-searchbreadth-first-search - Data Structure DesignMediumModel answerCall Channel State Manager
Build a stateful manager that allows exactly one active two-party call at a time, with proper validation and error handling.
Data Structure Designstate-machineobject-oriented-designvalidationexceptions - Data Structure DesignHardAuto-gradedSimulate a TTL-Aware LFU Cache with Frequency Snapshots
Tests ability to simulate a multi-operation Least-Frequently-Used cache that evicts expired entries by TTL and breaks ties by recency, while supporting frequency-snapshot queries.
Data Structure Designdata structurescachesimulation - Arrays & HashingHardAuto-gradedCoin Flip Race: HHT vs HTH Probability and Conditional Wait
Tests whether you can set up a Markov chain for a pattern race, derive absorption probabilities, and compute a conditional expected stopping time.
Arrays & Hashingmarkov-chainsprobabilityexpected-value - Linked ListsMediumAuto-gradedInterleave Two Linked Lists from Their Midpoints
Tests pointer-manipulation reasoning by reordering a singly linked list (given as an array) so nodes alternate between the first and second halves, starting from their respective midpoints.
Linked Listslinked liststwo pointersarray manipulation