practice a little every day — you've got this ♡
Interview Practice 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 1351–1380 of 2229 results
- Trees & GraphsMediumAuto-gradedEqual Binary Digits and Ascending Tree Chain
Tests prefix-sum balancing for binary arrays and depth-first search for strictly increasing root-to-leaf paths in binary trees.
Trees & Graphstreesarraysprefix-sumdfs - Math & Bit ManipulationMediumAuto-gradedTwo-Year Show Profit: Renewal vs. New Launch
Compute two-year profits for two show options, blend the new show's outcomes by success probability, and find the break-even probability.
Math & Bit Manipulationarithmeticexpected-valuebreak-evenbusiness-math - StringsHardAuto-gradedEncode Consecutive Character Runs as Digit Sequences
Tests run-length encoding with multi-digit counts split into individual characters, requiring careful pointer management and constant-space thinking.
Stringstwo-pointersrun-length-encodingin-place - Arrays & HashingMediumAuto-gradedGrid Walker with Blocked Cells
Tests simulation with hash-based obstacle lookup, movement logic, and tracking a running maximum over coordinate positions.
Arrays & Hashingsimulationhash-setgrid - Heaps, Sorting & SearchMediumAuto-gradedMerge Sorted Event Streams with Running Sum
Tests k-way merging of pre-sorted sequences using a min-heap, deterministic tie-breaking by source index, and accumulating a running total across all events.
Heaps, Sorting & Searchheapmergek-way-mergerunning-sum - Dynamic ProgrammingMediumAuto-gradedScore Bust Probability: Stop When You Hit the Target
Tests whether a candidate can build an O(n) sliding-window DP to compute the probability that a random accumulation process stops within a given score ceiling.
Dynamic Programmingdynamic-programmingsliding-windowprobability - StringsMediumAuto-gradedMultiply Large Numbers as Strings
Tests implementation of grade-school multiplication on arbitrarily large integers represented as strings without using built-in big integer operations.
Stringsmathsimulationarray-manipulation - Arrays & HashingMediumAuto-gradedSingle Buy-Sell Transaction for Maximum Gain
Tests optimal single-pass tracking of minimum buy price to maximize profit from one stock transaction.
Arrays & Hashingarraysgreedyoptimizationsingle-pass - Arrays & HashingMediumAuto-gradedBuild Sorted Email Event Timeline for Subscriptions
Tests date arithmetic, multi-level sort stability, and designing a rule system that cleanly handles event ordering and extensibility.
Arrays & Hashingsortingdatessimulation - Data Structure DesignMediumAuto-gradedSimulate a Linked List with Iterator and Transform
Tests ability to implement a doubly-linked list supporting sequential iteration and non-mutating element-wise transformation via a command-driven simulation.
Data Structure Designlinked-listiterator-patternhigher-order-functions - Heaps, Sorting & SearchMediumAuto-gradedMerge K Sorted Lists to Find Smallest Elements
Tests efficient multi-way merge using a min-heap to extract the k smallest values from multiple sorted arrays without flattening the entire input.
Heaps, Sorting & Searchheapmergesortingoptimization - Data Structure DesignMediumAuto-gradedFixed-Capacity Eviction Cache with Recency Tracking
Tests whether you can design a cache that evicts the least recently accessed entry in O(1) time by combining a hash map with an ordered structure.
Data Structure Designhash-maplinked-listdesigncache - Trees & GraphsHardAuto-gradedDetect a Profitable Currency Trade Loop
Tests whether you can model exchange rates as a weighted directed graph and apply Bellman-Ford to detect a cycle whose rate product exceeds 1.
Trees & Graphsgraphsbellman-fordlogarithms - Trees & GraphsMediumAuto-gradedReachable Stocked Nodes Within a Hop Limit
Tests BFS on an undirected graph to filter nodes by shortest-path distance and a secondary inventory condition, including edge-case handling for missing keys and duplicates.
Trees & Graphsbfsgraphsshortest-path - SQL & DataMediumAuto-gradedCount Distinct Users by Department and Time Window
Tests set-based deduplication and join logic to find unique users who interacted with products in a specific department during a time range.
SQL & Datadata-manipulationset-operationsfiltering - Math & Bit ManipulationMediumAuto-gradedFewest Steps to Reach One
Tests greedy reasoning over binary structure to find the minimum number of halving and increment/decrement steps needed to reduce a positive integer to 1.
Math & Bit Manipulationgreedybit-manipulationmath - Arrays & HashingMediumAuto-gradedCount Members With Continuous Subscription at Final Timestamp
Tests per-entity state simulation where a subscription can only be renewed while still active, and any lapsed subscription is permanently void.
Arrays & Hashingsimulationhash-mapstate-machine - Data Structure DesignMediumAuto-gradedBoard Game: Detect k-in-a-Row on a Rectangular Grid
Tests incremental win detection on an m×n board by tracking consecutive run lengths at endpoints to check for k-in-a-row in O(1) per move.
Data Structure Designdesignarrayssimulation - Arrays & HashingMediumAuto-gradedPosterior Probability of Facility Given Red Samples
Tests Bayesian reasoning: computing the posterior probability of a hypothesis using likelihoods and equal priors.
Arrays & Hashingprobabilitybayes-theoremmathematical-reasoning - Arrays & HashingMediumAuto-gradedAll Orderings and Subsets of Distinct Integers
Tests recursive backtracking by building every permutation and every k-length subset of a list of distinct integers in a single function.
Arrays & Hashingbacktrackingrecursioncombinatorics - Math & Bit ManipulationHardAuto-gradedDecompose an IP Range into the Fewest CIDR Blocks
Tests greedy interval tiling and bit manipulation by converting an inclusive IPv4 address range into the minimum list of valid, aligned CIDR blocks.
Math & Bit Manipulationbit-manipulationgreedynetworking - Arrays & HashingHardAuto-gradedCell Absorption Simulation: Dominant Cell After Feeding Rounds
Simulate a row of cells that absorb weaker neighbors across repeated left-to-right rounds and identify the largest survivor at equilibrium.
Arrays & Hashingsimulationarrayslist-mutation - StringsMediumAuto-gradedFirst Window Matching a Letter-Frequency Snapshot
Tests fixed-size sliding window technique with O(1) per-step character-count bookkeeping to locate the leftmost permutation of a pattern inside a longer string.
Stringssliding-windowhash-maptwo-pointers - Heaps, Sorting & SearchMediumAuto-gradedCollect All Closest Adjacent Value Pairs
Tests sorting and greedy scanning to identify the smallest gap between elements and extract all pairs achieving it.
Heaps, Sorting & Searchsortinggreedyarrays - Greedy & IntervalsMediumAuto-gradedCalculate Worker Pay with Bonus Time Periods
Tests interval merging, overlap calculation, and time-based pay aggregation with capped rate multipliers.
Greedy & Intervalsintervalsarraysmath - SQL & DataMediumAuto-gradedJoin User Profiles and Purchase Records, Fill Gaps, Compute Line Spend
Tests left-join logic, mode imputation for missing categorical fields, and null-safe row-level spend calculation using plain Python dicts.
SQL & Datadata-manipulationjoinsnull-handling - Dynamic ProgrammingMediumAuto-gradedCompact RLE Coder: Decode a String and Re-encode Under Pattern Limit
Tests string parsing for RLE decoding and interval DP to find the shortest valid re-encoding when patterns are capped at length K.
Dynamic Programmingstringsdynamic-programmingcompression - Trees & GraphsMediumAuto-gradedResolve Boolean Signal Chains with Negation and Cycle Detection
Tests iterative functional-graph traversal: propagating True/False through chains of references and NOT, while correctly marking cycles, dangling references, and their dependents as unresolvable.
Trees & Graphsgraph traversalcycle detectionhash map - Trees & GraphsMediumAuto-gradedExtract String Leaf Paths from Nested JSON Structure
Traverse nested dictionaries and lists to collect dot-and-bracket paths to all string values, returned in sorted order.
Trees & Graphstree-traversaliterationstackpath-building - Stacks & QueuesHardAuto-gradedPeak Values in Fixed-Length Subarrays
Tests understanding of monotonic deques to efficiently track the largest element across consecutive fixed-size subarrays in linear time.
Stacks & Queuesdequesliding-windowmonotonic-queue