practice a little every day — you've got this ♡
Interview Practice Problems
Practice 5988 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.
- 5988
- Problems
- 2219
- Auto-graded
- 15
- Topics
- 271
- Added today
Showing 361–390 of 2219 results
- Data Structure DesignMediumAuto-gradedLongest Dictionary Word Ending With a Given Tail
Answer batches of suffix queries over a word list, returning the longest match with lexicographic tie-breaking, using a reversed-word trie with cached best words.
Data Structure Designtriestringssuffixpreprocessing - StringsMediumAuto-gradedString Array Framing and Round-Trip Encoding
Design a robust serialization scheme that packs a list of arbitrary strings into a single string and successfully reconstructs it without ambiguity.
Stringsstringsarraysdesign-ds - Arrays & HashingMediumAuto-gradedLongest Strictly Rising Window After One Edit
Find the longest contiguous strictly increasing window in an integer array after replacing at most one element with any integer, using prefix and suffix run lengths.
Arrays & Hashingarrayssliding-windowprefix-suffixdynamic-programming - Data Structure DesignHardAuto-gradedSeat Row Simulator: Leftmost Block Booking and Group Release
Simulate a row of seats where each booking takes the leftmost free block of a given length and a release frees all of a group's seats, efficiently on large inputs.
Data Structure Designsegment-treelazy-propagationsimulationinterval-bookkeeping - Math & Bit ManipulationMediumAuto-gradedList Every Prime Not Exceeding a Limit
Tests whether you can enumerate all primes up to a limit efficiently using a sieve instead of per-number primality tests, including the n below 2 edge case.
Math & Bit Manipulationsieveprimesnumber-theoryarrays - Data Structure DesignEasyAuto-gradedSimulate Stream Price Volatility Monitor
Execute stateful stream commands to maintain the two most recent values and calculate their difference and floating-point average.
Data Structure Designdesign-dssimulationstate-management - Dynamic ProgrammingMediumAuto-gradedCount Reachable Totals from a Bounded Coin Collection
Count the distinct positive totals obtainable from a limited supply of coins per denomination, testing bounded subset-sum reachability with DP or bitset techniques.
Dynamic Programmingdynamic-programmingsubset-sumbounded-knapsackbitset - Stacks & QueuesMediumAuto-gradedSmallest Subsequence Containing Each Letter Once
Build the lexicographically smallest subsequence that uses every distinct letter of a string exactly once, using a greedy monotonic stack with remaining-count tracking.
Stacks & Queuesmonotonic-stackgreedystringssubsequence - Trees & GraphsMediumAuto-gradedSemester Planner: Build a Valid Course Sequence
Produce a deterministic topological ordering of courses from prerequisite pairs, or an empty list when a circular requirement makes it impossible.
Trees & Graphstopological-sortgraphbfscycle-detection - Data Structure DesignMediumAuto-gradedSkill-Based Task Dispatcher Simulation
Simulate a dispatcher that gives queued tasks to skilled workers by project priority and current load, using per-project queues and tie-break rules.
Data Structure Designdesignsimulationheaphash-map - SQL & DataMediumAuto-gradedDay-30 Cohort Retention from Signup and Activity Logs
Group users into signup-date cohorts and count who was active exactly 30 days later, using sets and date arithmetic with careful handling of duplicates.
SQL & Datahash-setdate-arithmeticaggregationcohort-analysis - Arrays & HashingEasyAuto-gradedTally Opening Click-Paths Across Shoppers
Group timestamped events by user, order them in time, and count how many distinct users share each opening action sequence of length up to k.
Arrays & Hashinghash-mapgroupingsortingprefixes - StringsMediumAuto-gradedSplit Text by Longest Dictionary Prefix with Single-Char Fallback
Scan a string left to right, always consuming the longest dictionary word starting at the current position, or one character if none match; tests tries and prefix matching.
Stringstriegreedystring-processingprefix-matching - Data Structure DesignMediumAuto-gradedPer-Key Token Bucket Admission Decisions
Simulate independent token buckets per key over a request log, with exact fractional refill, capped capacity, and out-of-order timestamps, to decide which requests are admitted.
Data Structure Designrate-limitertoken-buckethash-mapsimulation - Stacks & QueuesMediumAuto-gradedEvaluate a Spaced Arithmetic String Without Parentheses
Evaluate an integer expression with +, -, *, / using standard precedence and truncating division, in a single pass over a string with arbitrary spacing.
Stacks & Queuesparsingstringstackoperator-precedence - Data Structure DesignMediumAuto-gradedExpiring Compute Credits: Earliest-Expiry-First Ledger Simulation
Simulate a credit ledger replaying a command list, spending the soonest-expiring grants first, with all-or-nothing spends and time-based expiry.
Data Structure Designheapsimulationgreedydesign - Data Structure DesignMediumAuto-gradedLinked Cell Grid with Cycle-Safe Formula Updates
Simulate a 26x26 grid whose cells hold integers or one-reference offset formulas, answering lookups lazily and rejecting any formula assignment that would close a dependency loop.
Data Structure Designgraphcycle-detectionsimulationhash-map - Trees & GraphsMediumAuto-gradedEarliest Safe Starting Cell in a Jump Array
Find the smallest start index in a jump array whose walk never goes below index 0, handling cycles and right exits, ideally in linear time.
Trees & Graphsfunctional-graphcycle-detectionmemoizationarrays - Arrays & HashingEasyAuto-gradedCollapse Round-Trip Routes into Distinct City Pairs
Normalize directed city pairs into unordered ones, remove duplicates, and return them in sorted order, testing canonicalization with hashing and sorting.
Arrays & Hashinghashingsortingdeduplicationcanonical-form - SQL & DataMediumAuto-gradedTop Three Categories by Average October Sale Value
Filter records to one month, group by key, apply a minimum-count threshold, compute a rounded average, and return the top three groups, mirroring a SQL WHERE/GROUP BY/HAVING/ORDER BY/LIMIT pipeline.
SQL & Dataaggregationhash-mapgroup-bysorting - Trees & GraphsMediumAuto-gradedRoute Between Two Nodes of an Implicit Recursive Tree
Find the unique path between two pre-order-indexed nodes in a huge recursively defined tree, using subtree sizes to navigate without building it.
Trees & Graphstreelcarecursionpre-order - Arrays & HashingMediumAuto-gradedBusiest Network Addresses With Tie-Inclusive Top Ten Cutoff
Normalize IPv4/IPv6 strings, skip invalid ones, count occurrences, and return the top ten addresses while keeping every address tied at the tenth-place frequency.
Arrays & Hashinghash-mapcountingsortingstring-parsing - Trees & GraphsMediumAuto-gradedStrongest Signal Route in a Lossy Link Network
Find the route between two nodes in an undirected graph that maximizes the product of per-link delivery probabilities, using a Dijkstra-style search with a max-priority queue.
Trees & Graphsgraphdijkstraheapshortest-path - Data Structure DesignEasyAuto-gradedReplay Tennis Game Commands and Report Scores
Simulate a single tennis game from a command log, tracking points, deuce, advantage and the winner, and return each score query's text.
Data Structure Designsimulationstate-machinedesignstrings - Heaps, Sorting & SearchMediumAuto-gradedBoosting Your Budget With a Limited Number of Ventures
Greedy selection with a sorted unlock pointer and a max-heap: repeatedly pick the most profitable venture whose entry threshold fits the current funds, up to a fixed number of picks.
Heaps, Sorting & Searchheapgreedysortingpriority-queue - Data Structure DesignHardAuto-gradedVersioned Cache and Longest Dependency Chain
Process a series of timestamped key-value operations and find the longest non-cyclic path in a dependency graph.
Data Structure Designdesign-dstrees-graphsdynamic-programmingbinary-search - Data Structure DesignHardAuto-gradedSimulate Alternating Tic-Tac-Toe Game Engine
Process a series of game instructions to maintain state, validate turns and positions, and return outcome status for each operation.
Data Structure Designdesign-dsarraysstate-machine - Trees & GraphsMediumAuto-gradedBalanced BST Level-Order Output from a Sorted Sequence
Build a height-balanced BST from a sorted list using a fixed middle-element rule, then serialize it level by level with null placeholders.
Trees & Graphsbinary-search-treedivide-and-conquerrecursionlevel-order-traversal - Data Structure DesignMediumAuto-gradedShift Ledger: Rates, Promotions and Bonus Windows
Simulate a command stream for a shift ledger with deferred pay-rate changes, merged global bonus windows and a ranking of employees by hours worked.
Data Structure Designdesignsimulationinterval-mergingsorting - Arrays & HashingMediumAuto-gradedClockwise Grid Walk Around Obstacles and Visited Cells
Simulate a clockwise inward walk over a grid with obstacle cells, turning on edges, obstacles and visited cells, and stopping when every direction is closed.
Arrays & Hashingmatrixsimulationspiralgrid