practice a little every day — you've got this ♡
Interview Practice Problems
Practice 6021 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.
- 6021
- Problems
- 2229
- Auto-graded
- 15
- Topics
- 272
- Added today
Showing 901–930 of 2229 results
- Data Structure DesignMediumAuto-gradedSimulate 2048 Moves with Scripted Tile Spawns
Simulate a 4x4 sliding-tile merge game with scripted spawns, skipping spawns on no-op moves, then report the final board and whether any move remains.
Data Structure Designsimulationmatrixstate-managementdeterministic-testing - Dynamic ProgrammingMediumAuto-gradedHighest-Yield Consecutive Stretch in a Profit Log
Find the largest total achievable by a non-empty run of adjacent integers, handling all-negative inputs and large sums, in one pass with constant extra space.
Dynamic Programmingkadanesubarraydynamic-programmingarrays - Arrays & HashingEasyAuto-gradedBayesian Origin Probability for Sampled Items
Calculate the posterior probability that two black items came from a specific facility using Bayes' Theorem.
Arrays & Hashingstatisticsprobabilitybayes-theorem - Arrays & HashingEasyAuto-gradedOverlap Ratio of Two Token Lists
Compute the overlap ratio between the distinct strings of two lists using hash sets, with exact string matching and a defined result when both lists are empty.
Arrays & Hashinghash-setsetsstringsedge-cases - Greedy & IntervalsEasyAuto-gradedFind Peak Event Density in Fixed Duration Window
Determine the maximum number of recorded logs occurring within a contiguous time interval using a sliding window approach.
Greedy & Intervalssliding-windowtwo-pointersarraysintervals - Trees & GraphsMediumAuto-gradedHide Flagged Comment Threads for a Pet-Preference Reader
Find all comments hidden from a reader when any flagged comment hides its whole reply subtree, handling unordered input, dangling parent IDs, and very deep chains.
Trees & Graphstreedfshash-mapforest - Math & Bit ManipulationEasyAuto-gradedDetermine Convergence of Digit-Square Sums
Simulate a transformation that replaces a number with the sum of its squared digits, determining if it terminates at 1 or loops indefinitely.
Math & Bit Manipulationmathhash-tabletwo-pointers - StringsMediumAuto-gradedGroup Digits of a Signed Integer with a Custom Delimiter
Build a string from a signed 64-bit integer, placing a delimiter between each group of three digits from the right, with the minus sign kept in front, using manual digit handling.
Stringsstringsmathformattingdigit-extraction - Trees & GraphsMediumAuto-gradedAlphabetical Job Scheduler with Prerequisite Rules
Produce a full run order for jobs under prerequisite constraints, always picking the alphabetically smallest available job, or return an empty list if a cycle exists.
Trees & Graphstopological-sortheapgraphkahn-algorithm - Heaps, Sorting & SearchMediumAuto-gradedLocate K Nearest Values in a Sorted Sequence
Binary search for the starting boundary of a contiguous k-element slice minimizing distance to a given target in a sorted list.
Heaps, Sorting & Searchbinary-searchtwo-pointersarrays - Trees & GraphsMediumAuto-gradedVertical Column Grouping of Array-Represented Binary Trees
Organize the elements of a binary tree into vertical columns using level-order traversal rules on a level-order array input.
Trees & Graphstrees-graphsbreadth-first-searcharraysqueues - Data Structure DesignMediumAuto-gradedSimulate a Tiny Hierarchical File Store from a Command Log
Replay a command log against an in-memory directory tree, with auto-created parent folders, file appends, reads and sorted listings.
Data Structure Designdesigntrietreehash-map - Arrays & HashingMediumAuto-gradedMost Popular Three-Page Browsing Path Across Users
Group visit logs by user, order them by time, and find the three-page ordered path shared by the most distinct users, with a lexicographic tie-break.
Arrays & Hashinghashingsortingcombinationscounting - Trees & GraphsMediumAuto-gradedFind k-th Subordinate in Cascade Traversal
Find the k-th node reached during a preorder depth-first traversal of a specific node's subtree when children are visited in ascending numerical order.
Trees & Graphstrees-graphsdfstree-traversal - Data Structure DesignMediumAuto-gradedHierarchical Storage Simulator with Auto-Renamed Duplicates
Simulate an in-memory directory tree with auto-created folders, numbered duplicate file names that respect extensions, content lookup, and sorted listings.
Data Structure Designdesignhash-mapstring-parsingsimulation - Trees & GraphsEasyAuto-gradedTrace Path to Terminal Node or Cycle Entry
Determine the final visited node when following single-successor directed edges until reaching a dead end or a previously visited node.
Trees & Graphstrees-graphsarrayshash-table - Trees & GraphsMediumAuto-gradedCan Every Task Be Scheduled Given Dependency Pairs?
Tests modeling dependencies as a directed graph and detecting whether a cycle prevents a complete valid ordering, e.g. via indegree-based topological sorting.
Trees & Graphsgraphtopological-sortcycle-detectionbfs - Greedy & IntervalsMediumAuto-gradedWeekly Deploy Windows with Time Zones and Blackouts
Convert weekly recurring allow and freeze windows from local time zones to UTC, subtract the freezes, and list the first usable slots after a notice period.
Greedy & Intervalsintervalssweep-linetime-zonesmodular-arithmetic - Data Structure DesignHardAuto-gradedCache, Quota Gate and Burst Counter: Batch Operation Runner
Simulate a batch of operations on an O(1) LFU cache, a fixed-window per-user quota check, and a two-pointer peak request counter.
Data Structure Designlfu-cacheordered-dictrate-limitingtwo-pointers - Heaps, Sorting & SearchMediumAuto-gradedMaximize Resource Harvest with Linear Depletion
Find the maximum yield from extracting resources over K time steps when each extraction reduces a site's yield by 1 using binary search on the minimum threshold.
Heaps, Sorting & Searcharraysheaps-sortinggreedy-intervalsmath-bits - Greedy & IntervalsMediumAuto-gradedMetered Usage Bill with Special Rate Windows
Compute a total bill over a half-open time window where disjoint special-rate windows replace the default hourly rate, testing interval clipping and boundary handling.
Greedy & Intervalsintervalssweepmatharrays - Greedy & IntervalsMediumAuto-gradedAnalyze Schedule Capacity and Overlaps
Evaluate interval concurrency to determine if single-resource scheduling is possible and calculate peak concurrent demand.
Greedy & Intervalsintervalssortingheapsweep-line - Math & Bit ManipulationEasyAuto-gradedConfusion Matrix Scorecard with Safe Division
Compute precision, recall, specificity, F1 and accuracy from confusion-matrix counts, returning 0.0 for any metric whose denominator is zero.
Math & Bit Manipulationmetricsconfusion-matrixedge-casesarithmetic - Data Structure DesignHardAuto-gradedInteractive Time Calendar with Pagination and Range Queries
Process dynamic interval updates, range queries, and ordered pagination operations efficiently.
Data Structure Designtrees-graphsdesign-dsgreedy-intervals - Heaps, Sorting & SearchMediumAuto-gradedMerge Multiple Sorted Series with Grouping
Efficiently merge K pre-sorted event logs while combining entries sharing identical timestamps.
Heaps, Sorting & Searchheaps-sortingarraystwo-pointers - Math & Bit ManipulationEasyAuto-gradedProbability of Keeping Majority Red Items
Calculates the probability that at least two of three kept items are red when green items are returned upon selection.
Math & Bit Manipulationmathcombinatoricsprobability - Arrays & HashingHardAuto-gradedCalculate Expected Roll Counts for Target Dice Sequences
Evaluate expected values for geometric process waiting times and pattern completion using Markov chain state transitions.
Arrays & Hashingprobabilityexpected-valuemarkov-chainscombinatorics - Arrays & HashingEasyAuto-gradedFind Minimum and Mode of an Integer Array
Find the minimum element and the most frequent element (mode) in an unsorted list of integers.
Arrays & Hashingarrayshash-tablefrequency-counting - Trees & GraphsHardAuto-gradedCalculate Subtree Totals in a Tree
Given an undirected tree and node weights, compute the sum of values for every subtree rooted at node 1.
Trees & Graphstrees-graphsdfstree-traversalbottom-up - Math & Bit ManipulationMediumAuto-gradedChance a Daily +/- Walk Ends Below Zero
Model a price as a two-step random walk, reduce it to a binomial lower tail with a strict cutoff, and sum that tail in a numerically stable way.
Math & Bit Manipulationprobabilitybinomialnumerical-stabilityrandom-walk