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
- 273
- Added today
Showing 541–570 of 6000 results
- Greedy & IntervalsEasyAuto-gradedShift Pay Totals Across Time-of-Day Wage Bands
Sum payouts for work sessions by intersecting each session with non-overlapping hourly wage bands, using interval overlap arithmetic.
Greedy & Intervalsintervalsoverlapsimulationarrays - Trees & GraphsMediumModel answerRight Edge of a Tree and Minimal Bracket Removal
Two linked tasks: list the nodes visible from the right of a binary tree, and delete the fewest parentheses from a string so the rest is balanced.
Trees & Graphsbinary-treebfsstackstrings - System DesignHardModel answerAtomic Updates Across Orders, Payments and Inventory Services
Design a protocol that keeps writes consistent across several services and databases, comparing 2PC, 3PC and Sagas, and covering failures, retries, timeouts and delivery guarantees.
System Designdistributed-transactionstwo-phase-commitsagaidempotency - Heaps, Sorting & SearchMediumAuto-gradedPick the k-th Smallest Value Without Fully Sorting
Find the k-th smallest value in an unsorted integer list, counting duplicates, using a linear-time selection idea such as quickselect instead of a full sort.
Heaps, Sorting & Searchquickselectselectionpartitioningorder-statistics - System DesignHardModel answerEnterprise Document Q&A with Retrieval and Generation at Scale
Design an end-to-end, multi-tenant retrieval-augmented question-answering platform over large, mixed-format document collections, with strict isolation, freshness, latency and cost targets.
System Designragvector-searchml-system-designhybrid-retrieval - System DesignMediumModel answerReal-Time Chat for Mass-Audience Livestreams
Design a chat feed for livestreams where one broadcast may have over a million viewers, with sub-half-second delivery, durable storage and live moderation.
System Designfan-outwebsocketkafkareal-time - Machine LearningMediumModel answerFixing an Underfit Boosted-Tree Model: Which Knob to Loosen?
Pick the one hyperparameter that, when lowered, makes a gradient-boosted tree ensemble more flexible, justify it, and describe how to confirm underfitting.
Machine Learninggradient-boostingunderfittinghyperparameter-tuningbias-variance - SQL & DataMediumModel answerTrial Conversion and Day-30 Return Rates per Experiment Arm
Write one SQL query comparing control and treatment on 7-day trial conversion and on a week-long return window starting 30 days after the trial begins.
SQL & Datasqlab-testingcohort-analysisretention - Heaps, Sorting & SearchMediumAuto-gradedWindow Mean After Discarding the Top Values
Compute the mean of every fixed-size window after removing its k largest entries, which requires an ordered structure that supports efficient insertion and deletion.
Heaps, Sorting & Searchsliding-windowheapfenwick-treeorder-statistics - Trees & GraphsMediumAuto-gradedNegative Loop Reachable From a Source Vertex
Decide whether a weighted directed graph has a negative-total cycle reachable from a given source vertex, using Bellman-Ford while ignoring unreachable regions.
Trees & Graphsgraphsbellman-fordnegative-cycleshortest-path - Arrays & HashingEasyAuto-gradedSelect Stale Replica Files for Copying
Filter a list of source file records against destination records using readability, writability, size and timestamp rules, returning names in source order.
Arrays & Hashinghash-mapfilteringsimulation - StringsMediumAuto-gradedEarliest Second the Secret Is Beyond Repair
Find the first second at which at least m substrings of a string contain a corrupted character, using complement counting and a reverse-time merge of clean runs.
Stringsstringsunion-findcountingreverse-simulation - System DesignMediumModel answerDesign a Scalable API Rate Limiter
Architect a high-performance, distributed rate limiting system for an API gateway handling high-throughput, bursty traffic.
System Designrate-limiterdistributed-systemsapi-gatewayredis - Trees & GraphsMediumAuto-gradedFind a Word Spanning the Fragments at a Tree's Leaves
Stream the leaf strings of a binary tree in left-to-right order and decide whether a pattern occurs in their concatenation, without ever building the full text.
Trees & Graphsbinary-treekmpstring-matchingiterative-dfs - Arrays & HashingEasyAuto-gradedCount Distinct Engaged Ads Per Day from an Event Log
Tests filtering an event log by type, grouping by date, counting distinct ids with sets, and returning date-sorted results while omitting dates that have no qualifying events.
Arrays & Hashinghash-mapsetgroupingsorting - System DesignMediumModel answerFinding Identical Files in a Huge Directory Tree
Group byte-identical files across a directory tree too large for memory, minimizing disk reads, staying correct under hash collisions, and scaling out across workers.
System Designdeduplicationhashingexternal-memoryfile-systems - BehavioralMediumModel answerProve Your Engineering Work Moved a Business Metric
Describe a project you drove for a business or operational result, covering how you set success criteria, what you measured, and how you showed your own work caused the change.
Behavioralbehavioralimpactmetricsattribution - Greedy & IntervalsHardAuto-gradedFuse Collinear Point Chains Along Shared Lines
Group point lists by the infinite line they lie on, then fuse those that overlap or touch along that line, and return each fused group's unique points ordered along the line.
Greedy & Intervalsgeometryintervalshashingsorting - Machine LearningMediumModel answerBuilding a Classifier for Authentic vs Synthetic DNA Sequences
Design a robust system to classify genuine vs generated DNA sequences, leveraging a massive unlabelled real corpus, minimal ground-truth labels, custom negative generators, and bio-aware metrics.
Machine Learningmachine-learningsequence-modelingsemi-supervised-learninganomaly-detection - System DesignHardModel answerDesign a Scalable Distributed Task Processing Engine
Design an architecture for a multi-tenant distributed task execution platform handling millions of parallel jobs, emphasizing fault tolerance, scheduling, leases, and idempotency.
System Designsystem-designdistributed-systemsfault-tolerancequeues - Math & Bit ManipulationHardAuto-gradedReachability Under Sum-Replacement Moves on a Grid
Decide whether one positive integer point can become another by repeatedly replacing a coordinate with the coordinate sum, for values up to 10^18, by reversing moves with modulo.
Math & Bit Manipulationmatheuclidean-algorithmmoduloreverse-thinking - Machine LearningEasyModel answerChoosing a Search Strategy for Model Hyperparameters
Compare strategies for searching hyperparameters, from hand tuning to Bayesian and early-stopping methods, weighing cost, parallelism and sample efficiency.
Machine Learninghyperparameter-tuningbayesian-optimizationrandom-searchhyperband - SQL & DataEasyAuto-gradedName the Anomaly in an Interleaved Two-Transaction Schedule
Identify which classic concurrency anomaly a fixed read/read/write/write schedule on one shared value produces, and return the matching option letter.
SQL & Datatransactionsconcurrencyisolation-levelsserializability - BehavioralMediumModel answerBehavioral Prep: Motivation, Pivots and Fast Calls for a PM Loop
Prepare structured answers for five common product-manager behavioral prompts: company motivation, role fit, a mid-project pivot, a decision under ambiguity, and a five-year plan.
Behavioralbehavioralproduct-managerleadership-principlesstar-method - Trees & GraphsMediumAuto-gradedRecover a Letter Ordering from a Sorted Word List
Derive precedence constraints between letters from adjacent sorted words, then topologically sort them while detecting contradictions and invalid prefix orderings.
Trees & Graphstopological-sortgraphstringscycle-detection - System DesignHardModel answerBuilding a Global Multi-Tenant Scheduling and Events Platform
Design a calendar backend for hundreds of millions of users covering events, recurrence, time zones, sharing, reminders, sync, and storage choices, with APIs, schemas, queries, and scaling.
System Designsystem-designcalendarrecurrencesharding - Statistics & ExperimentsHardModel answerSample Size Planning for a Conversion Experiment and Its Levers
Size a two-arm conversion test from a baseline rate and relative lift, then explain how tighter alpha, higher power, uneven splits, clustering, interim looks and overdispersed counts change the required n.
Statistics & Experimentspower analysissample sizetwo-proportion z-testdesign effect - SQL & DataEasyAuto-gradedSponsors Active in Both Opening Weeks
Given a log of ad submission rows, find the sponsors with at least one submission in week 1 and at least one in week 2, returned sorted, which tests set intersection and deduplication.
SQL & Datasetsdeduplicationintersectiondata-manipulation - Statistics & ExperimentsMediumModel answerReading a Flight-Delay Regression: Metrics and Diagnostics
Walk through interpreting and diagnosing a multiple linear regression for flight delays: standardized coefficients, fit metrics, collinearity, heteroskedasticity, intercepts, and misspecified residuals.
Statistics & Experimentslinear-regressionmulticollinearityheteroskedasticitymodel-diagnostics - Machine LearningMediumModel answerDecoding Text from Next-Token Probabilities: Greedy vs Beam
Build a greedy decoder and a width-k beam search over a next-token model, return each sentence with its probability, and explain why long outputs score low and how to correct it.
Machine Learningbeam-searchdecodinglanguage-modelslog-probabilities