practice a little every day — you've got this ♡
Coding Interview Problems
Practice 6025 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.
- 6025
- Problems
- 2231
- Auto-graded
- 15
- Topics
- 273
- Added today
Showing 961–990 of 2784 results
- Trees & GraphsMediumAuto-gradedCheapest Dungeon Escape Through Monster Cells
Find the minimum number of monster cells entered on any route from start to exit in a grid with walls, using a weighted shortest-path search such as Dijkstra or 0-1 BFS.
Trees & Graphsgriddijkstrashortest-path0-1-bfs - Data Structure DesignMediumAuto-gradedCall-Signature Cache with Least-Recently-Used Eviction
Simulate a fixed-capacity LRU cache keyed by a call's positional and keyword arguments, with order-insensitive, type-aware key matching.
Data Structure Designlru-cachehash-mapdoubly-linked-listcanonical-keys - StringsEasyAuto-gradedMax Length Product of Non-Overlapping Disjoint-Alphabet Substrings
Find the maximum product of lengths of two non-overlapping substrings that do not share any characters.
Stringsstringsmath-bitsarrays - Data Structure DesignMediumAuto-gradedThread-Safe Inventory Management
Simulate concurrent inventory purchases and sales ensuring atomic state updates, preventing negative inventory, and handling invalid operations cleanly.
Data Structure Designdesign-dsarraysconcurrency - Heaps, Sorting & SearchEasyAuto-gradedCombine and Sort Two Unordered Integer Sequences
Merge two unordered arrays of integers into a single list arranged in non-decreasing order.
Heaps, Sorting & Searchsortingarraysfundamentals - Greedy & IntervalsEasyAuto-gradedDoes a New Booking Collide With Existing Slots?
Decide whether a proposed half-open time slot shares any time with a list of unsorted booked slots, testing overlap logic and correct handling of touching endpoints.
Greedy & Intervalsintervalsoverlaphalf-openlinear-scan - Heaps, Sorting & SearchMediumAuto-gradedKth Biggest Value Across a Pair of Ascending Lists
Find the kth largest value in the union of two ascending integer lists, counting duplicates, ideally using binary search on a partition instead of a full merge.
Heaps, Sorting & Searchbinary-searchsorted-arraysorder-statisticstwo-arrays - Trees & GraphsHardAuto-gradedMost Distinct Values After Shifting Each Element
Choose one shift per element from a given list to maximize distinct results; tests recognizing the problem as bipartite matching and implementing Hopcroft-Karp efficiently.
Trees & Graphsbipartite-matchinghopcroft-karpgraphsgreedy-pitfalls - Stacks & QueuesMediumAuto-gradedLongest Well-Formed Bracket Run
Find the length of the longest contiguous well-formed stretch in a string of only round brackets, testing stack-based index tracking and handling of unmatched characters.
Stacks & Queuesstackstringparenthesestwo-pass - Dynamic ProgrammingMediumAuto-gradedCheck Palindrome Transformation Within K Removals
Determine if a given string can be converted into a palindrome by removing at most k characters.
Dynamic Programmingdynamic-programmingstringsbit-manipulation - Heaps, Sorting & SearchMediumAuto-gradedOrder Trading Strategies by Chance of a Positive Day
Rank strategies by the chance of a positive next-day return, using a predictive spread that includes both daily volatility and uncertainty in the estimated mean.
Heaps, Sorting & Searchsortingstatisticscustom-keyprobability - Math & Bit ManipulationEasyAuto-gradedExact Binomial Probability of Coin Flips
Calculates the exact binomial probability of obtaining a specific number of heads across a series of fair coin tosses.
Math & Bit Manipulationmathprobabilitycombinatorics - Heaps, Sorting & SearchHardAuto-gradedPriority Task Scheduler with Tag Filtering and Splicing
Schedule tasks subject to dependency constraints, priority ordering, tag-based task filtering with dependency splicing, and cycle detection.
Heaps, Sorting & Searchheaps-sortingtrees-graphstopological-sort - Math & Bit ManipulationEasyAuto-gradedCalculate Progressive Income Tax in Cents
Determine progressive income tax in cents given bracket thresholds and percentage rates using integer math.
Math & Bit Manipulationmatharrayssimulation - Greedy & IntervalsMediumAuto-gradedText Formatting and Dynamic Schedule Tracker
Perform greedy text wrapping to fixed line widths alongside dynamic interval point queries with insertion and removal.
Greedy & Intervalsgreedyintervalsfenwick-treecoordinate-compression - Heaps, Sorting & SearchMediumAuto-gradedUnique Union of Several Pre-Sorted Lists
Combine many ascending integer lists into one ascending list with each distinct value appearing once, ideally using a heap-based k-way merge.
Heaps, Sorting & Searchheapk-way-mergededuplicationsorted-arrays - Data Structure DesignMediumModel answerLog Test Executions and Query Failure Recovery and Concurrent Failures
Design an event-driven system to track test statuses, calculate minimum recovery durations, and identify the longest continuous window of high concurrent failures.
Data Structure Designdesign-dsgreedy-intervalsarrays - Greedy & IntervalsMediumAuto-gradedCalculate Max Trading Returns from Multi-Asset Feed
Process an unordered multi-asset market feed to find the maximum possible cumulative profit across all tickers.
Greedy & Intervalsarraysgreedysortinghash-map - Data Structure DesignHardAuto-gradedState-Driven Job Scheduler with DLQ and Dependencies
Simulate an event-driven task queue handling execution states, lease timeouts, retry budgets, dependencies, and dead-letter cascading.
Data Structure Designdesign-dsheaps-sortingtrees-graphsstacks-queues - StringsMediumAuto-gradedScore a Guess Against a Hidden Word with Exact and Shifted Hits
Compute exact-position and misplaced letter counts between a guess and a secret using leftover letter counts, with a sentinel for guesses missing from the word list.
Stringsstringshashingfrequency-countingsimulation - Heaps, Sorting & SearchMediumAuto-gradedMaximum Concatenation of Nonnegative Integers
Order a list of nonnegative integers so that joining their decimal forms gives the biggest possible number, using a pairwise concatenation comparator and handling the all-zero case.
Heaps, Sorting & Searchsortingcustom-comparatorstringsgreedy - Arrays & HashingEasyAuto-gradedIncrement Large Integer Represented as Digits
Process an array of decimal digits representing a non-negative integer by adding one, correctly handling carry propagation and list expansion.
Arrays & Hashingarraysmath-bitseasy - Heaps, Sorting & SearchMediumModel answerDesign a Single-Threaded Delayed Task Runner
Implement a priority-queue task runner that handles delayed execution without busy-waiting.
Heaps, Sorting & Searchheappriority-queuedesign-dstime-complexity - Arrays & HashingEasyAuto-gradedActivity Windows from Sensor Readings Over a Cutoff
Scan sorted timestamped sensor readings once and group consecutive readings strictly above a cutoff into [first_time, last_time] windows.
Arrays & Hashingarraystwo-pointersintervalssimulation - Arrays & HashingMediumAuto-gradedFirebreak Choice in a Spreading Crop Disease Grid
Simulate a synchronous grid disease model with delayed death or recovery, then try every single-row or single-column firebreak to minimize dead plants.
Arrays & Hashingsimulationgridbrute-forcecellular-automaton - Arrays & HashingMediumAuto-gradedCalculate Welch's T-Test P-Value for Experiment Rides
Process user experiment assignments and ride telemetry data to calculate a Welch's two-sample t-test p-value under strict filtering rules.
Arrays & Hashingstatisticsdata-processinghypothesis-testing - Greedy & IntervalsEasyAuto-gradedExtract Continuous Active Time Windows
Process chronological sensor sample logs to extract continuous active periods matching a minimum elapsed duration requirement.
Greedy & Intervalsgreedy-intervalsarraystwo-pointers - Greedy & IntervalsMediumAuto-gradedWildcard Brackets: Can the Sequence Be Made Valid?
Decide if a string of brackets and wildcards can be made valid by choosing each wildcard's role, testing range-tracking of reachable open counts or a greedy two-pass argument.
Greedy & Intervalsgreedystringsparenthesesdynamic-programming - Heaps, Sorting & SearchMediumModel answerDesign and Analyze an Intentionally Inefficient Correct Sorting Algorithm
Propose a fully correct yet highly inefficient sorting algorithm, prove its termination and correctness, and derive its time and space complexity.
Heaps, Sorting & Searchsortingcomplexity-analysiscombinatoricsrecursion - Heaps, Sorting & SearchMediumAuto-gradedWeighted Distribution Sampling from Uniform Draws
Validate probability weights and map pre-generated uniform float values to discrete outcomes using prefix sums and binary search.
Heaps, Sorting & Searcharraysbinary-searchmathvalidation