practice a little every day — you've got this ♡
Interview Practice Problems
Practice 5962 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.
- 5962
- Problems
- 2208
- Auto-graded
- 15
- Topics
- 271
- Added today
Showing 1–30 of 5962 results
- Greedy & IntervalsMediumAuto-gradedConsolidate Overlapping Time Intervals
Evaluate ability to sort and combine overlapping or adjacent half-open numerical intervals in linear-arithmetic time.
Greedy & Intervalsintervalssortingarraysgreedy - Heaps, Sorting & SearchEasyAuto-gradedAdaptive Merge Sort with Comparison Counter
Count element-level comparisons during an adaptive divide-and-conquer merge sort.
Heaps, Sorting & Searchsortingdivide-and-conquerrecursionarrays - Arrays & HashingMediumAuto-gradedShortest Window Holding Exactly k Different Values
Find the shortest contiguous slice of an integer list containing exactly k different values, using a sliding window with frequency counts.
Arrays & Hashingsliding-windowhash-mapsubarraytwo-pointers - Math & Bit ManipulationEasyAuto-gradedTheoretical Mean and Variance of Permutation Inversions
Derive and evaluate the closed-form expected value and variance for the number of inversions in a uniformly random permutation.
Math & Bit Manipulationmathcombinatoricsstatisticsprobability - System DesignMediumModel answerBuild a Multi-User Live Text Editing Platform
Design a service where many people edit one document at once, see each other's changes quickly, keep history, show live cursors, and can work offline, all while converging to one state.
System Designsystem-designreal-timeoperational-transformationcrdt - Data Structure DesignMediumModel answerPython ABCs and the Three Kinds of Methods Explained
Explain how abstract base classes work in Python and how instance, class and static methods differ in binding, inheritance behavior and typical use.
Data Structure Designpythonoopabstract-classesclassmethod - System DesignMediumModel answerStock Reservation Service for a Flash-Sale Storefront
Design a stock service that reports sellable quantity and reserves items for orders without overselling under concurrency, with idempotent retries, expiry, and contention handling.
System Designconcurrency-controlidempotencyinventorytransactions - Trees & GraphsHardModel answerConstruct Non-Conflicting Queens Configurations
Compute all possible configurations of n non-attacking queens on an n x n board using stateful depth-first search.
Trees & Graphsbacktrackingrecursiondepth-first-search - Data Structure DesignMediumModel answerHandling Seekable Body Replays on 307 Redirects in Python requests
Debug and implement stateful body rewind logic for seekable file-like streams when executing HTTP 307 redirects in an HTTP client library.
Data Structure Designpythonhttpdebuggingstreams - Arrays & HashingEasyAuto-gradedCheck a Call Against a Catalog of Function Signatures
Decide whether an ordered list of argument types fits any function in a catalog, given required, trailing optional, and variadic parameters with exact type matching.
Arrays & Hashingsimulationarray-scanningsignature-matchingedge-cases - Trees & GraphsMediumAuto-gradedStop Listing and Indented Reporting Tree from Raw Inputs
Parse a JSON string into formatted stop lines and turn employee rows into a sorted, indented reporting-tree outline using an adjacency list and iterative DFS.
Trees & Graphsjsontreedfssorting - Statistics & ExperimentsMediumModel answerJudging Two Short-Form Ephemeral Content Products Head to Head
Design a measurement plan to decide which of two sibling apps has the stronger ephemeral photo/video feature, covering metrics, confounders, and causal methods.
Statistics & Experimentsmetric-designcausal-inferenceexperimentationproduct-analytics - BehavioralMediumModel answerWalking Through a Past Engineering Mistake and What Changed
Behavioral question: recount a real technical error from an internship or project, explain its root cause, how you worked with others to fix it, and the lasting habits you built.
Behavioralbehavioralaccountabilityroot-cause-analysisfeedback - Statistics & ExperimentsEasyModel answerSimulated Trading Round: Arbitrage, Bet Sizing, and Market Making
Evaluate probability lines, identify structural arbitrage, determine optimal Kelly stake allocations, and quote dynamic markets during a multi-game simulation.
Statistics & Experimentsprobabilityexpected-valuekelly-criterionarbitrage - System DesignMediumModel answerDesign a Multi-Location Book Reservation & Inventory System
Architect a distributed inventory, reservation, and circulation platform across multiple physical locations with transactional guarantees, idempotency, and search index synchronization.
System Designsystem-designdistributed-systemsconcurrencydatabases - System DesignHardModel answerGlobal Link Shortener: Fast Redirects and Collision-Free Aliases
Design a worldwide short-link service with fast, always-available redirects, unique compact IDs, custom aliases, expiry, and asynchronous click analytics.
System Designsystem-designurl-shortenercachingid-generation - System DesignEasyModel answerFastest Way to Get a 2 TB Dataset to a Colleague in San Francisco
Estimate and compare network transfer against shipping physical storage for a 2 TB dataset, state assumptions, and identify when each approach wins.
System Designback-of-envelopedata-transfernetworkingestimation - Statistics & ExperimentsMediumModel answerRaising Member Profile Completeness: Metrics, Gaps, Tests
Design a measurement and experimentation plan to get more members of a professional network to fill out their profiles, from defining completeness to testing interventions.
Statistics & Experimentsproduct-analyticsexperiment-designmetricssegmentation - Linked ListsMediumAuto-gradedMin, Reverse, and Staircase Search in One Function
Compute a list's minimum, its reversal, and whether a target exists in a row- and column-sorted matrix, all in one combined function.
Linked Listslinked-listreversalmatrix-searchtwo-pointers - Trees & GraphsMediumAuto-gradedSmallest-First Course Ordering With Cycle Check
Produce the lexicographically smallest valid course order from prerequisite pairs, or an empty list if a cycle makes it impossible, using a topological sort with a min-heap.
Trees & Graphstopological-sortgraphheapcycle-detection - BehavioralMediumModel answerTechnical Ownership Story and Ship-Fast-Versus-Safe Judgment Call
Prepare a structured account of a technically demanding project you led, plus a story about shipping under deadline pressure while managing correctness risk and technical debt.
Behavioralbehavioraltechnical-leadershipproject-deep-divetrade-offs - Data Structure DesignMediumAuto-gradedLocate a Traveler's Airport by Timestamp
Process a batch of operations that load travel records and answer per-user point-in-time location queries using grouping, sorting and binary search.
Data Structure Designbinary-searchhash-mapintervalsdesign - Arrays & HashingMediumAuto-gradedShortest Subarray with K Unique Values
Find the minimum length of a contiguous subarray containing at least K unique elements using a sliding window.
Arrays & Hashingsliding-windowtwo-pointershash-tablearrays - BehavioralMediumModel answerPitching Your Product Background for a Luxury EV Software Role
Prepare a connected set of answers for a premium electric-vehicle PM conversation: career story, company knowledge, motivation, future goals, and a user-experience case study.
Behavioralbehavioralproduct-managermotivationux - SQL & DataMediumModel answerLast-Touch Ad Attribution: Daily Campaign Conversion Report
Write a SQL query that credits each conversion to the latest eligible ad impression within a 7-day lookback, then reports daily campaign metrics for January 2024.
SQL & Datasqlwindow-functionsattributionjoins - Trees & GraphsMediumAuto-gradedMinimum Grid Manhattan Distance Between Target Characters
Find the minimum Manhattan distance between any pair of target characters in a 2D character grid.
Trees & Graphsbfsmatrixdistance-transformgraphs - Heaps, Sorting & SearchMediumAuto-gradedRolling Window Mean After Dropping the Largest k
Compute the mean of each fixed-size window after discarding its k largest values, which needs a structure that supports fast insertion, deletion and sum-of-smallest queries.
Heaps, Sorting & Searchsliding-windowfenwick-treeorder-statisticsheaps - Data Structure DesignMediumAuto-gradedRoom Assignment and Leaderboard for Streaming Sessions
Simulate a stream of operations that assigns sessions to the lowest-numbered free room and reports the top-k streams by total duration, tested with heaps and lazy deletion.
Data Structure Designheapdesignsimulationlazy-deletion - System DesignMediumModel answerDesigning Reusable Agent Skills with Staged Context Loading
Describe what a reusable skill package is in an agent system, how it differs from a plain prompt, and how loading its content in stages keeps context small while limiting risk.
System Designagentsllm-systemscontext-managementprogressive-disclosure - Dynamic ProgrammingMediumAuto-gradedProcess Morse Signals and Provider Coverage
Evaluate string encoding, ambiguous Morse code decoding via dynamic programming, and spatial coverage checking for network members.
Dynamic Programmingdynamic-programmingstringsarraysgeometry