practice a little every day — you've got this ♡
Coding Interview Problems
Practice 6020 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.
- 6020
- Problems
- 2229
- Auto-graded
- 15
- Topics
- 274
- Added today
Showing 1891–1920 of 2782 results
- Data Structure DesignMediumAuto-gradedOut-of-Order Loan Event Ledger with Fee-First Payments
Tests ordered insertion, fee-before-principal payment allocation, and efficient forward-propagation of balance changes when events arrive out of sequence.
Data Structure Designsimulationsorted-insertdata-structure-design - StringsMediumAuto-gradedMinimum Edits to Form Palindromic Segments
Tests two-pointer logic and palindrome verification to compute the fewest replacements that transform every fixed-size segment into a palindrome.
Stringstwo-pointerspalindromegreedy - Math & Bit ManipulationMediumAuto-gradedOverflow-Safe Power with a Custom Modular Multiplier
Tests whether a candidate can build exponentiation from scratch using only 64-bit-safe addition and multiplication under an arbitrary modulus.
Math & Bit Manipulationmodular arithmeticbit manipulationexponentiation by squaring - Trees & GraphsMediumAuto-gradedConnected Land Regions on a Grid (8-Direction)
Tests graph traversal skills by counting connected components in a character grid where land cells are neighbours in all eight directions including diagonals.
Trees & Graphsgraph traversalBFS/DFSflood fillconnected components - StringsMediumAuto-gradedVerify Anagram Coverage for All Contiguous Substrings
Tests whether every contiguous substring of length 3 or more in a given string can be rearranged to match some dictionary word.
Stringsanagramsprefix-sumhashing - Math & Bit ManipulationMediumAuto-gradedFour Numbers, One Target: Arithmetic Reachability
Tests combinatorial search over arithmetic expressions, exact rational arithmetic, and division-by-zero handling to decide if four numbers can combine to a target.
Math & Bit Manipulationbacktrackingrecursionmath - Data Structure DesignHardAuto-gradedIn-Memory Row Store with Filter, Sort, and Projection
Tests ability to build a stateful table abstraction that processes insert and query operations with filtering, sorting, and column projection.
Data Structure Designdesignsimulationsorting - Arrays & HashingMediumAuto-gradedFind All Triplets That Sum to a Target Value
Tests efficient two-pointer technique with sorted arrays, duplicate handling, and edge-case reasoning.
Arrays & Hashingtwo-pointerssortingdeduplication - Data Structure DesignMediumModel answerRandom Draw from a Mutable Membership Set in O(1)
Build a container that registers and removes integer keys and returns a uniformly random current key, all in average constant time.
Data Structure Designhash-maparrayrandomizedconstant-time - Math & Bit ManipulationEasyAuto-gradedSteady-State Junction Temperature With and Without Heatsink
Compute a component's junction temperature from power dissipation and series thermal resistances, both before and after adding a heatsink.
Math & Bit Manipulationthermal-modelingarithmeticembedded-systemssteady-state - Heaps, Sorting & SearchMediumAuto-gradedGrouped Median Property Price by Region
Tests ability to compute per-group medians over a list of records, correctly handling odd/even counts, duplicate values, and half-up rounding to two decimal places.
Heaps, Sorting & Searchsortinggroupingmediandecimal-precision - Trees & GraphsMediumAuto-gradedGroup Accounts by Shared Identity Fields
Tests the ability to model transitive relationships between records using Union-Find (DSU) to identify connected components linked by shared attribute values.
Trees & Graphsunion-findconnected-componentshashing - StringsEasyAuto-gradedArrange Garment Sizes in Standard Order
Tests understanding of counting sort for a fixed alphabet, achieving linear time complexity instead of comparison-based sorting.
Stringscounting-sortstring-manipulationlinear-time - Greedy & IntervalsMediumModel answerPacking a Fixed-Size Block from a Large Mempool with CPFP
Design a fee-maximizing transaction selector for a size-capped block, extend it to parent/child dependencies with CPFP scoring, and derive a minimum child fee.
Greedy & Intervalsgreedyknapsackdependency-trackingcryptocurrency - Trees & GraphsMediumModel answerMinimum Arrival Time in a Scheduled Transit Network
Find the earliest time a traveler can reach a destination station given a fixed train timetable, then reconstruct the full itinerary with transfers and waits.
Trees & Graphsgraph-searchdijkstrabfstime-expanded-graph - Data Structure DesignMediumAuto-gradedSimulate a Fixed-Capacity Recency-Eviction Cache
Tests whether you can combine a hash map and ordered structure to implement O(1) get/put with least-recently-used eviction on a bounded cache.
Data Structure Designhash-maplinked-listcachedesign - Arrays & HashingMediumAuto-gradedLongest Circular Run of Ones with One Flip
Tests sliding window technique on a circular binary array to find the maximum consecutive ones achievable by flipping at most one zero.
Arrays & Hashingsliding-windowcircular-arraytwo-pointers - Heaps, Sorting & SearchMediumAuto-gradedK Most Common Values in an Array
Tests frequency counting and top-k selection using hash maps, heaps, or bucket sort, including complexity trade-off reasoning.
Heaps, Sorting & Searchhash-mapheapbucket-sort - Arrays & HashingMediumAuto-gradedMaximum Vacation Length and Efficient Distinct Value Counting
Tests sliding window technique for contiguous subarrays with constraints and binary search optimization for counting distinct values in sorted arrays.
Arrays & Hashingsliding-windowbinary-searchtwo-pointeroptimization - Trees & GraphsMediumAuto-gradedFind the Hub Node in a Star-Shaped Network
Tests recognition of star-graph topology and the insight that the central node is uniquely identified by its degree.
Trees & Graphsgraphsdegreestar-graph - Arrays & HashingMediumAuto-gradedLongest Subarray with Bounded Pairwise Spread
Tests ability to use the two-pointer (sliding window) technique to find the longest contiguous subarray where the difference between the max and min elements stays within a given limit.
Arrays & Hashingarraystwo pointerssliding window - Greedy & IntervalsMediumAuto-gradedMaximize Total Score by Pairing Players Optimally
Tests whether a candidate can apply a greedy sort-and-pair strategy to maximize the sum of pair minimums across a list of player ratings.
Greedy & Intervalsgreedysortingarrays - Arrays & HashingHardAuto-gradedTiered Subscription Invoice with Mid-Cycle Proration
Tests ability to combine prorated flat fees with two-tier volume pricing over a half-open time window.
Arrays & Hashingsimulationmathaggregation - StringsMediumAuto-gradedLongest Uniform Stretch With a Swap Budget
Tests efficient sliding-window reasoning to find the longest substring that can be made all one character using at most k single-character replacements.
Stringssliding-windowstringsfrequency-counting - Trees & GraphsMediumAuto-gradedFind the Bottleneck Weight Between Two Nodes
Compute the smallest possible maximum edge weight along any path connecting two vertices in a weighted undirected graph.
Trees & Graphsgraphunion-findgreedybottleneck-path - Data Structure DesignMediumAuto-gradedIn-Memory Spreadsheet with Formula Evaluation and Cycle Detection
Build a spreadsheet system that stores values, evaluates formulas referencing other cells, and prevents circular dependencies through pre-write validation.
Data Structure Designgraphdependency-trackingcycle-detection - Arrays & HashingHardAuto-gradedExperiment Sample Size and Runtime Calculator
Tests ability to apply the two-sample normal approximation for A/B test sizing and convert a required sample count into a minimum experiment duration.
Arrays & Hashingstatisticsexperimentationa-b-testing - Data Structure DesignMediumModel answerFile Storage with Quotas, Copy, and Compression
Build an in-memory file system tracking per-user storage limits, supporting file operations including duplication, compression, and quota-driven eviction.
Data Structure Designhash-mapheapobject-oriented-designbookkeeping - Dynamic ProgrammingHardModel answerTwo-Station Job Scheduling with Setups and a Downtime Window
Assign and sequence three jobs across two parallel stations to minimize makespan, handling sequence-dependent changeovers, a precedence constraint, and a station blackout period.
Dynamic Programmingschedulingcombinatorial-optimizationbranch-and-boundNP-hardness - Heaps, Sorting & SearchMediumAuto-gradedBest Recall Cutoff That Meets a Minimum Precision Target
Tests threshold search on a scored ranking: find the cut-point that maximises recall while keeping precision at or above a given floor, with correct tie-breaking.
Heaps, Sorting & Searchsortingprecision-recallbinary-classification