practice a little every day — you've got this ♡
Interview Practice Problems
Practice 5971 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.
- 5971
- Problems
- 2211
- Auto-graded
- 15
- Topics
- 272
- Added today
Showing 121–150 of 5971 results
- SQL & DataEasyAuto-gradedMonth-over-Month Revenue Change per Store
Group order records by store and calendar month, then compute each month's percentage change versus the store's previous active month, handling zero totals and gaps.
SQL & Dataaggregationgroup-bywindow-functionsdictionaries - Data Structure DesignMediumModel answerMaking a Memoizing Python Function Safe for Many Threads
Critique a Python function that caches expensive results in a dict, then make it thread-safe so each input is computed once, without blocking cache hits or unrelated inputs.
Data Structure Designpythonconcurrencycachinglocking - Arrays & HashingMediumAuto-gradedQuickest Kilometer Within a Run Recorded in 5-Second Splits
Find the highest average speed over any 1000 m stretch of a run given per-5-second distances, using prefix sums, binary search and interpolation at boundaries.
Arrays & Hashingprefix-sumsbinary-searchsliding-windowinterpolation - Trees & GraphsMediumAuto-gradedGroup Staff Names by Reporting Depth
Turn flat employee-manager records into a list of name groups by depth from the top manager, using a level-by-level breadth-first traversal.
Trees & Graphsbfstreehash-maplevel-order - BehavioralMediumModel answerDisagreement With a Colleague and Your Real-World Use of AI Tools
A two-part behavioral prompt: tell a story about resolving a disagreement with a coworker, then describe how you used generative AI at work and kept its output trustworthy.
Behavioralbehavioralconflict-resolutiongenerative-aiownership - StringsMediumAuto-gradedLongest Window With a Capped Number of Distinct Letters
Find the length of the longest contiguous stretch of a string using no more than k different characters, testing the sliding-window technique with a frequency map.
Stringssliding-windowtwo-pointershash-mapstrings - Math & Bit ManipulationMediumAuto-gradedFit a Line by Batch Gradient Descent with Standardized Input
Implement full-batch gradient descent for a one-feature least-squares line, standardizing the input, and map the learned parameters back to the original scale.
Math & Bit Manipulationgradient-descentlinear-regressionnumericalfeature-scaling - Dynamic ProgrammingMediumAuto-gradedClimbing the Tallest Staircase Through a Height Map
Find the longest chain of strictly rising values in a grid using only up, down, left, right steps, which tests DP over an implicit DAG with a valid processing order.
Dynamic Programmingdynamic-programminggridtopological-ordermemoization - Statistics & ExperimentsHardModel answerEvaluate the Financial Impact of a Grocery Loyalty Scheme
Formulate a comprehensive plan to estimate incremental profit for a retail loyalty card using staggered Difference-in-Differences, observational matching, and risk guardrails.
Statistics & Experimentsstatisticscausal-inferencedifference-in-differencesexperiment-design - Arrays & HashingEasyAuto-gradedEarliest Strict Valley in an Integer Sequence
Scan an integer list for the leftmost interior value strictly smaller than both adjacent values, returning -1 if none exists, which tests boundary handling and strict comparisons.
Arrays & Hashingarrayscanboundary-conditionsstrict-comparison - Statistics & ExperimentsMediumModel answerDiagnosing a 15% Monthly Rise in Batch Job Turnaround Time
A key operational duration metric rose 15% month over month; explain how you would find the root causes with data and what actions you would recommend.
Statistics & Experimentsroot-cause-analysismetric-diagnosismix-shiftexperimentation - Data Structure DesignMediumAuto-gradedStream Merging Iterator for Two Ordered Sequences
Simulate a stateful iterator that lazily combines two strictly sorted sequences into a single sorted, duplicate-free stream using constant space.
Data Structure Designdesign-dsarraysheaps-sorting - Data Structure DesignMediumAuto-gradedWildcard Word Dictionary Simulator
Simulate a word store that answers pattern queries where '.' stands for any single letter, which is best handled with a prefix tree and a depth-aware traversal.
Data Structure Designtriedesignwildcarddfs - Heaps, Sorting & SearchEasyAuto-gradedLast Stone Standing: Repeated Smash of the Two Heaviest Weights
Simulate repeatedly removing the two largest values and reinserting their difference, using a max-heap to find the last remaining value or 0.
Heaps, Sorting & Searchheappriority-queuesimulation - Trees & GraphsMediumAuto-gradedWeb Crawling Discovery and Bracket Syntax Check
Perform a depth-bounded graph traversal over web pages based on domain filtering, and validate balanced brackets using a stack.
Trees & Graphsbfsgraph-traversalstackstring-validation - BehavioralMediumModel answerStuck, Late, or Criticized: Telling Your Engineering Story
Three behavioral prompts: a long-running blocker, a project that slipped or drew user complaints, and a clear account of your current work, reasons for moving and future technical focus.
Behavioralbehavioralstar-methodownershipcommunication - System DesignHardModel answerArchitecting a Scalable Async Text-to-Video Generation Platform
Design a robust ML system to handle asynchronous, long-running text-to-video inference, featuring state machine orchestration, GPU worker fault tolerance, and multi-tier scheduling.
System Designsystem-designmachine-learningdistributed-systemsasync-processing - Data Structure DesignMediumAuto-gradedSliding Window Stream Aggregator
Design a memory-efficient real-time streaming data structure to query moving averages over a sliding temporal window.
Data Structure Designsliding-windowdequedesignstream-processing - Stacks & QueuesMediumModel answerLine of Sight Counts for Each Person in a Row
For each person in a row, count how many people further right they can see when anyone standing between must be shorter than both of them. Needs an O(n) approach.
Stacks & Queuesmonotonic-stackarraysamortized-analysisnext-greater-element - Trees & GraphsMediumAuto-gradedFast Power Residue Plus Nearest-Source Grid Map
Combine square-and-multiply modular exponentiation with a multi-source BFS that labels every grid cell with its distance to the nearest source cell.
Trees & Graphsbfsmodular-exponentiationgridmulti-source-bfs - System DesignMediumModel answerDesign a Data Ingestion System for Autonomous Vehicle Mapping Fleets
Design an end-to-end telemetry and sensor data collection system for a mapping fleet, handling route planning, physical/wireless offloading, data quality checks, and privacy sanitization.
System Designsystem-designdistributed-systemsetldata-pipelines - Data Structure DesignMediumModel answerVersioned Follow Graph with Time-Travel Queries and Suggestions
Build an in-memory directed follow graph with cheap snapshots, historical edge lookups, and a friends-of-friends suggestion ranking with id tie-breaks.
Data Structure Designgraphsnapshotsbinary-searchheap - Arrays & HashingMediumAuto-gradedChain-Reaction Tile Clearing on a Grid
Simulate a grid game where runs of three or more equal tiles vanish together, tiles fall down, and the process repeats until the grid is stable.
Arrays & Hashingsimulationmatrixtwo-pointersgrid - StringsEasyAuto-gradedValid Palindrome with At Most One Removal
Determine whether a given string can be converted into a palindrome by removing no more than one character.
Stringsstringstwo-pointers - Arrays & HashingMediumAuto-gradedFind Members Missing a Nearby Provider Specialty
Given providers and members on a 2D plane, find members with a required specialty that has no provider within a distance limit, using hashing and spatial grouping.
Arrays & Hashinghashinggeometrygrid-bucketingsimulation - Statistics & ExperimentsMediumModel answerProbability and Regression Fundamentals: A Rapid-Fire Review
A multi-part conceptual review covering dice probabilities, variance estimation, correlation versus independence, OLS and regularization, multicollinearity, and PCA.
Statistics & Experimentsprobabilityolsregularizationmulticollinearity - Data Structure DesignMediumModel answerLive Scoreboard Engine for One Tennis Game
Process a sequence of point winners for a single tennis game and print the correct score after each point, including deuce, advantage and the win-by-two rule.
Data Structure Designsimulationstate-designclass-designedge-cases - Data Structure DesignMediumAuto-gradedIn-Memory Bank Ledger with Pending Transfers and Expiry
Simulate an in-memory banking system processing sequential operations, pending transfers with fixed-window expiration, and account activity tracking.
Data Structure DesignData StructuresSimulationDesignHash Table - BehavioralMediumModel answerFixing a Broken Engineering Workflow: A Data-Driven Story
Describe a time you spotted a systemic technical weakness, chose a fix over alternatives, proved it worked with evidence, and owned its ongoing cost.
Behavioralbehavioralownershiptrade-offsmetrics - System DesignHardModel answerArchitecting an Enterprise Experimentation and Feature Flag Platform
Design a distributed, highly available A/B testing infrastructure capable of sub-millisecond variant evaluation, scale-proof event ingestion, and statistically sound automated analysis.
System Designsystem-designab-testingdata-pipelinesdistributed-systems