practice a little every day — you've got this ♡
Interview Practice Problems
Practice 6013 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.
- 6013
- Problems
- 2228
- Auto-graded
- 15
- Topics
- 273
- Added today
Showing 751–780 of 2228 results
- Heaps, Sorting & SearchMediumAuto-gradedFinal Departure From a Bouncing Convoy on a Road
Find when the last vehicle leaves a segment and which one it is, when equal-speed vehicles reverse on contact, using pass-through equivalence and order preservation.
Heaps, Sorting & Searchsortingsimulation-shortcutghost-particlesordering-invariant - Data Structure DesignMediumAuto-gradedFrozen-View Integer Set with Independent Cursors
Simulate a mutable integer set whose iterators capture the set's contents at creation time and stay isolated from later changes and from each other.
Data Structure Designdesignhash-setiteratorsnapshot - Heaps, Sorting & SearchMediumAuto-gradedFind Boundary Indices in Sorted Sequence
Adapt binary search to locate the starting and ending index of a target value in a sorted sequence in logarithmic time.
Heaps, Sorting & Searchbinary-searcharrayssearching - Arrays & HashingEasyAuto-gradedDot Product of Two Run-Length Encoded Vectors
Compute the dot product of two run-length encoded integer vectors by walking both run lists together, without expanding them into full arrays.
Arrays & Hashingtwo-pointersrun-length-encodingsimulation - Trees & GraphsMediumAuto-gradedFollow Graph: Following Lists and Mutual-Count Suggestions
Answer batched queries on a static directed follow graph: list direct followees and rank second-hop accounts by how many followees also follow them.
Trees & Graphsgraphhash-mapadjacency-listsorting - Arrays & HashingEasyAuto-gradedCalculate Mean and Variance for the Sum of Two Variables
Compute the expected value and total variance of the combined sum of two random variables given their individual means, variances, and covariance.
Arrays & Hashingstatisticsprobabilitymath - StringsEasyAuto-gradedLongest Streak of a Repeated Character in a String
Scan a string once to find the longest streak of adjacent equal characters, keeping separated streaks distinct and using only constant extra memory.
Stringsstringstwo-pointerslinear-scanstate-tracking - Data Structure DesignMediumAuto-gradedStateful Banking System Ledger Engine
Simulate an in-memory banking ledger that processes chronologically ordered operations involving balances, leaderboards, delayed cashbacks, and account merges.
Data Structure Designdesign-dsheaps-sortingarrays - Trees & GraphsMediumAuto-gradedColumn-by-Column Readout of a Binary Tree from Level-Order Input
Group binary tree nodes by horizontal column, ordering each column by depth and then by value, with the tree given as a level-order list with nulls.
Trees & Graphsbinary-treebfssortingcoordinates - Arrays & HashingMediumAuto-gradedResolve Callable Names from Argument Type Lists
Match call argument types against registered signatures, some with a trailing repeatable parameter, and return the sorted names of every signature that fits each call.
Arrays & Hashinghashingstringsvariadic-matchingprefix-keys - Dynamic ProgrammingHardAuto-gradedCount and Score Conflict-Free Cap Distributions
Count the ways to give each person a distinct acceptable item and find the best total value, using a bitmask DP over people or bounded backtracking.
Dynamic Programmingbitmask-dpcountingbacktrackingassignment - Math & Bit ManipulationEasyAuto-gradedExpected Transit Wait Time with Stochastic Delays
Computes the expected waiting time for a passenger arriving at a random moment at a stop with probabilistic bus delays.
Math & Bit Manipulationmathprobabilitystatisticsexpected-value - Math & Bit ManipulationMediumAuto-gradedOptimal Warehouse Placement to Minimize Total Delivery Distance
Find the minimum cumulative Manhattan distance from a single target point to all target locations in a 2D grid.
Math & Bit Manipulationarraysmathsortinggrid - 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 - SQL & DataMediumAuto-gradedStandardize Global Compensation and Rank Top Earners
Deduplicate employee records across regions, convert local salaries to USD using historical exchange rates, and rank the top earners.
SQL & Datadata-manipulationhash-mapsortingsql - 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