practice a little every day — you've got this ♡
Interview Practice Problems
Practice 6000 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.
- 6000
- Problems
- 2221
- Auto-graded
- 15
- Topics
- 272
- Added today
Showing 541–570 of 2221 results
- Trees & GraphsEasyAuto-gradedNearest Node in a Binary Search Tree
Find the value in a Binary Search Tree represented as a level-order array that has the smallest absolute difference to a target number.
Trees & Graphstrees-graphsbinary-search-treesearch - Trees & GraphsMediumAuto-gradedFewest Moves Through a Walled Maze
Compute the minimum number of 4-directional moves between two open cells of a binary maze, or -1 if unreachable; tests breadth-first search on an implicit grid graph.
Trees & Graphsbfsgridshortest-pathgraph - StringsMediumAuto-gradedOrder Distinct Letters-Only Tokens by Popularity
Extract case-insensitive ASCII-letter tokens from text, count them, and list the distinct words by descending count with alphabetical tie-breaks.
Stringshash-mapstring-parsingsortingfrequency-count - Math & Bit ManipulationEasyAuto-gradedCalculate Credit Card Portfolio Metrics and Partnership Break-Even
Computes the annual net contribution per card, overall portfolio profit, and the minimum number of new accounts needed to cover a marketing campaign.
Math & Bit Manipulationmathfinancial-modelingarithmetic - Heaps, Sorting & SearchMediumAuto-gradedRoute Jobs to Workers with Account Stickiness
Simulate FIFO dispatch of tasks to workers with a preference for each account's last worker, using heaps and a lookup table to track free and busy workers.
Heaps, Sorting & Searchheapsimulationschedulinghash-map - Data Structure DesignMediumAuto-gradedEarliest Non-Repeating ID in a Live Feed Replay
Replay a sequence of operations on a stream of integer IDs and report, at each query, the earliest-arriving ID seen exactly once, using a hash map plus an ordered queue.
Data Structure Designhash-mapqueuedesignstreaming - Arrays & HashingEasyAuto-gradedFind All Top-Frequency Labels Without Using max()
Count items by their string form and return every label tied for the highest count, in first-appearance order, without calling max().
Arrays & Hashinghash-mapcountingfrequencyties - Heaps, Sorting & SearchMediumAuto-gradedGroup and Rank Feed Items with Photo Bundling
Rearrange feed items by sorting on rank score, grouping photos into batches of up to three, and maintaining stable ordering for equal scores.
Heaps, Sorting & Searchsortingarraysbatching - Data Structure DesignMediumAuto-gradedBatch Autocomplete Lookup Over a Dictionary of Words
Answer many prefix queries against a word list, returning sorted distinct matches for each, using sorting and binary search or a trie instead of rescanning the list per query.
Data Structure Designbinary-searchtriesortingstrings - Linked ListsEasyAuto-gradedCombine Two Sorted Sequences
Merge two non-decreasing sequences into a single sorted sequence, maintaining stable order on equal values.
Linked Liststwo-pointerslinked-listarrayssorting - Arrays & HashingMediumAuto-gradedPossible Minimum Excluded Values After One Increment
Find all possible values of the minimum non-negative excluded integer (MEX) achievable after at most one element increment.
Arrays & Hashingarrayshash-tablefrequency-arraymath - Data Structure DesignEasyAuto-gradedLog Event Processor with Time Order
Tests data structure management and stable sorting to process out-of-order time-stamped events while preserving insertion order for ties.
Data Structure Designsortingdata-structuresdesign - Greedy & IntervalsMediumAuto-gradedLongest Streak of Growing Daily Distinct Picks
Find how many days a growing-size distinct-item picking schedule can run, using binary search on the answer plus a capacity feasibility check.
Greedy & Intervalsgreedybinary-searchprefix-sumsfeasibility-check - Greedy & IntervalsHardAuto-gradedSimulate Trading Order Fill Rate Limit
Simulate order executions under a time-windowed volume participation constraint using a sliding window.
Greedy & Intervalssliding-windowqueuegreedytime-series - Trees & GraphsMediumAuto-gradedValidate Binary Tree from Directed Edge List
Evaluates tree properties, cycle detection, edge validity, and in-order traversal under strict error precedence.
Trees & Graphstreesgraphsdfstraversal - Greedy & IntervalsMediumAuto-gradedCollapse Booking Windows into Non-Touching Blocks
Merge inclusive ranges that share at least one point into a sorted list of disjoint ranges, testing sorting, a linear sweep, and correct handling of touching endpoints and nesting.
Greedy & Intervalsintervalssortingsweepgreedy - Data Structure DesignMediumAuto-gradedRate-Limited Dispatcher: Which Requests Fire and When
Simulate a rate limiter with a fixed lockout window that keeps only the newest waiting request, using event-driven processing and a precise rule for requests landing exactly at window end.
Data Structure Designsimulationevent-driventhrottletwo-pointers - StringsEasyAuto-gradedName the CSS Function for Red-Green-Blue With Optional Alpha
Recall which CSS color function takes red, green and blue channels plus an optional opacity value, and return its canonical name as a string.
Stringscssfundamentalstriviastring-return - Data Structure DesignMediumAuto-gradedProcess LFU Cache Operations with Frequency and Recency Eviction
Simulate a Least Frequently Used (LFU) cache supporting fast O(1) operations, breaking tie frequencies by least recent usage.
Data Structure Designdesign-dsarrayshash-table - Greedy & IntervalsMediumAuto-gradedLargest Group Anchored by One Overlapping Interval
Find the largest set of intervals that all intersect one chosen anchor interval, using sorting and binary search to beat quadratic time.
Greedy & Intervalsintervalsbinary-searchsortingcounting - Data Structure DesignMediumAuto-gradedRunning Median Tracker Over an Operation Log
Process a log of insert and query operations on an integer stream, returning the current median for each query, using two heaps for efficient updates.
Data Structure Designheaptwo-heapsstreamingmedian - Data Structure DesignMediumAuto-gradedSubscription Filter Matching with Ordered Delivery
Simulate a message router that matches nested JSON events against per-queue filter policies and returns matching queues in first-subscription order.
Data Structure Designdesignhash-mapjsonsimulation - Heaps, Sorting & SearchEasyAuto-gradedFind the Slot for a Value in a Sorted List of Distinct Integers
Tests explicit binary search on a sorted array: find a value's index or the position where it would be inserted, in logarithmic time.
Heaps, Sorting & Searchbinary-searchsorted-arrayarraystwo-pointers - Data Structure DesignMediumAuto-gradedPath-Keyed File Store with Per-User Storage Quotas
Simulate a command stream on an in-memory file store with admin and user-owned files, prefix/suffix search, copying, and quota-driven eviction.
Data Structure Designhash-mapsimulationsortingdesign - Trees & GraphsMediumAuto-gradedPrune a Branch from a Parent-Array Forest
Remove a node and its entire subtree from a forest stored as a parent array, either by marking slots with -1 or by compacting indices and remapping parent pointers.
Trees & Graphsforestdfsparent-arrayreindexing - Arrays & HashingMediumAuto-gradedWaiting-Time Triangle Density: Normalize and Evaluate the CDF
Normalize a piecewise-linear triangular density to find its constant, then evaluate the resulting piecewise-quadratic cumulative distribution at a list of query points.
Arrays & Hashingprobabilitycdfpiecewise-functionsintegration - Trees & GraphsMediumAuto-gradedDeterministic Mine Grid Plus Letter-Path Check
Build a mine-count grid with mines in row-major order, then use DFS backtracking to check whether a word can be traced through a separate letter grid.
Trees & Graphsgridbacktrackingdfssimulation - Data Structure DesignMediumAuto-gradedPer-User Request Throttle Simulator with Rolling Time Window
Replay a list of throttle operations and decide, per user, whether each request fits within k accepted requests in a rolling window of t ms, using inclusive boundary rules.
Data Structure Designsliding-windowdequehash-mapsimulation - Dynamic ProgrammingMediumAuto-gradedSmallest Sentence from a Spaceless String and Word List
Segment a spaceless string into dictionary words and return the lexicographically smallest valid sentence, or None if impossible; tests suffix DP plus greedy reconstruction.
Dynamic Programmingdynamic-programmingstringsgreedyword-break - Arrays & HashingEasyAuto-gradedRepair a Sensor Log: Merge, Sort, and Interpolate Gaps
Merge duplicate timestamps by averaging known readings, sort, then fill missing values by linear interpolation inside gaps and nearest-value holding at the ends.
Arrays & Hashinghash-mapsortinginterpolationtime-series