practice a little every day — you've got this ♡
Interview Practice Problems
Practice 5987 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.
- 5987
- Problems
- 2219
- Auto-graded
- 15
- Topics
- 270
- Added today
Showing 1891–1920 of 2219 results
- 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 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 - Arrays & HashingMediumAuto-gradedMultiply Two Matrices
Tests understanding of matrix multiplication mechanics, nested iteration, and accumulation patterns.
Arrays & Hashingmatrixnested-loopsmath - Heaps, Sorting & SearchMediumAuto-gradedMinimum Bandwidth to Stream All Files Within Deadline
Tests binary search on the answer to find the minimum integer bandwidth that allows streaming a list of files (each with a size and deadline) without missing any deadline using a greedy scheduler.
Heaps, Sorting & Searchbinary searchgreedysorting - Heaps, Sorting & SearchMediumAuto-gradedBuild Three-Color Outfits from Limited Inventory
Tests greedy allocation with heap-based selection and mathematical reasoning about resource constraints under distinct-element requirements.
Heaps, Sorting & Searchgreedyheapcombinatorics - Dynamic ProgrammingMediumAuto-gradedCheck if Text Can Be Built from Dictionary Words
Tests dynamic programming with Trie optimization to determine if a string can be fully decomposed into a sequence of dictionary words.
Dynamic Programmingtriestring-processingmemoization - Math & Bit ManipulationEasyAuto-gradedCalculate Binomial Cumulative Probability for Limited Supply
Tests understanding of binomial distributions and computing cumulative probabilities for discrete independent events.
Math & Bit Manipulationprobabilitybinomial-distributioncombinatorics - Stacks & QueuesMediumAuto-gradedCollapse Matching Neighbors
Tests stack-based simulation to eliminate adjacent equal characters iteratively until no more cancellations are possible.
Stacks & Queuesstackstring-manipulationsimulation - SQL & DataEasyAuto-gradedCompute Running Departmental Budget Consumed
Tests ability to implement window-style running totals by computing each row's cumulative spend within its department, ordered by date then transaction ID.
SQL & Datawindow functionsrunning totalsdata processing - Trees & GraphsHardAuto-gradedFeature Deployment with Integrity Checks and Dependency Ordering
Verify configuration integrity using polynomial hashing, detect dependency cycles with DFS, and produce a lexicographically-ordered topological deployment sequence.
Trees & Graphsgraph-traversaltopological-sorthashingcycle-detection - StringsMediumAuto-gradedIPv4 Address Checker and Builder
Tests string parsing, validation rules, and backtracking to check and generate valid IPv4 addresses from digit strings.
Stringsbacktrackingvalidationstring-processing - Greedy & IntervalsEasyAuto-gradedIntercept Aircraft and Count User Sessions
Tests greedy deadline scheduling for time-critical interception tasks and event grouping with gap-based sessionization.
Greedy & Intervalsgreedysortingsimulationevent-processing - Trees & GraphsHardAuto-gradedBuild Frequency-Based Binary Codec
Tests ability to construct a deterministic frequency tree with tie-breaking, generate prefix-free binary codes, and encode/decode strings.
Trees & Graphstreesheapsgreedybit-manipulation - Arrays & HashingMediumAuto-gradedFind Longest Subarray with Bounded Absolute Difference
Tests the ability to use two pointers alongside auxiliary tracking structures to find the longest contiguous subarray where max−min does not exceed a given threshold.
Arrays & Hashingarraystwo pointerssliding window - Data Structure DesignMediumAuto-gradedBuild a Min-Heap Data Structure from Scratch
Evaluates ability to implement a complete binary min-heap using array indexing, bubble-up, and bubble-down operations without library support.
Data Structure Designheaps-sortingarraysdata-structures - Dynamic ProgrammingMediumAuto-gradedExpected Wait Time and Coin Combination Counting
Tests probability reasoning with independent random events and dynamic programming for combinatorial counting with unlimited resources.
Dynamic Programmingprobabilityexpected-valuecombinatoricsunbounded-knapsack - StringsMediumAuto-gradedMinimum Window Containing All Target Characters
Tests the ability to efficiently find the smallest substring containing all required characters using sliding window and hash tables.
Stringssliding-windowhash-maptwo-pointers - Arrays & HashingHardAuto-gradedExpected Wait Time for Repeating Train Schedules
Calculate and compare expected waiting times for transit services with different repeating gap patterns using length-biased sampling.
Arrays & Hashingprobabilityexpected-valueinspection-paradox - Greedy & IntervalsMediumAuto-gradedOptimal 1D Coverage: Minimize Worst-Case Distance to k Centers
Tests binary-search-on-answer combined with a greedy interval feasibility check to solve the 1D k-center minimax placement problem.
Greedy & Intervalsbinary-searchgreedysorting - Stacks & QueuesHardAuto-gradedCheck Balanced Brackets and Find Tree Level Width
Tests stack-based matching for nested brackets and BFS position tracking to compute maximum horizontal distance in a binary tree.
Stacks & Queuesstackbfstree-traversalstring-validation - StringsMediumAuto-gradedFilter Files Without Write Access
Tests string parsing and bitwise permission logic to identify files that lack write permissions across all user categories.
Stringsstring-parsingfilteringpermissions - StringsMediumAuto-gradedMaximum Distinct Character Window
Tests sliding window technique with hash maps to find the longest contiguous span of non-repeating characters in a string.
Stringssliding-windowhash-maptwo-pointers - Heaps, Sorting & SearchMediumAuto-gradedSort a Large Sequence Using Memory-Bounded Runs and a Heap
Tests knowledge of two-phase external sorting: chunking a sequence into fixed-size sorted runs, then merging them efficiently with a min-heap.
Heaps, Sorting & Searchheapsortingmergesimulation - Arrays & HashingMediumAuto-gradedDetect Tic-Tac-Toe Termination on an n×n Grid
Tests scanning all rows, columns, and diagonals for a complete line of matching non-zero marks, and detecting a full board with no remaining moves.
Arrays & Hashingarraysmatrixgame-simulation - StringsEasyAuto-gradedFirst Longest Word with Even Character Count
Tests string parsing, filtering by character parity, tracking maxima with tie-breaking, and handling whitespace edge cases.
Stringsstring-manipulationlinear-scanedge-cases - Greedy & IntervalsMediumAuto-gradedMinimum Conference Rooms for Scheduled Meetings
Tests greedy interval scheduling with heap-based resource allocation to find the smallest number of rooms needed for overlapping meetings.
Greedy & Intervalsintervalsheapgreedyscheduling - Greedy & IntervalsEasyAuto-gradedCount Rooms In Use at Peak Time
Tests the sweep-line technique by finding the maximum number of meeting rooms simultaneously occupied across a set of half-open booking intervals.
Greedy & Intervalsgreedysweep lineintervals - Trees & GraphsMediumAuto-gradedCompute Subtree Sums from Parent Array
Tests bottom-up aggregation in trees represented as parent arrays, requiring iterative traversal to avoid recursion limits on deep trees.
Trees & Graphstreespost-orderaggregationiterative