practice a little every day — you've got this ♡
Interview Practice Problems
Practice 5986 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.
- 5986
- Problems
- 2219
- Auto-graded
- 15
- Topics
- 271
- Added today
Showing 5641–5670 of 5986 results
- Trees & GraphsHardModel answerNavigate Between Nodes in a Recursively Defined Binary Tree
Determine the path between two nodes in a Fibonacci-style binary tree using only their preorder indices, without building the tree in memory.
Trees & Graphsbinary-treesrecursionfibonaccitree-traversal - Trees & GraphsMediumAuto-gradedIdentify Connected Power Grid Regions
Tests union-find (disjoint set union) to group transmission lines into connected components and answer queries about grid connectivity.
Trees & Graphsunion-findgraphsconnected-components - Trees & GraphsMediumAuto-gradedGreenhouse Disease Spread Timer
Tests multi-source BFS to find the time until a grid-based propagation process completes or determine impossibility.
Trees & Graphsbreadth-first-searchgridmulti-source-bfs - Data Structure DesignMediumModel answerBuilding Robust Autocomplete Query Management
Design and implement the query-handling layer for an autocomplete component with debouncing, retry logic, response ordering, and result caching.
Data Structure Designasynccachingstate-management - Statistics & ExperimentsMediumModel answerMaximum Likelihood Estimation and Conditional Gaussian Distributions
Derive maximum likelihood estimators for Gaussian parameters under various constraints, compute conditional distributions in bivariate Gaussians, and analyze estimator bias.
Statistics & Experimentsmaximum-likelihoodgaussian-distributionconditional-probabilityestimator-bias - System DesignMediumModel answerBuilding a Fault-Tolerant Payment System with Zero Duplicates
Design a payment platform that prevents duplicate charges through idempotency, handles gateway timeouts safely, and maintains financial correctness.
System Designdistributed-systemspaymentsidempotencyconcurrency - Data Structure DesignMediumModel answerConcurrent In-Memory Cache with Sharded Locking
Build a thread-safe in-memory cache supporting concurrent reads and writes, choosing data structures and synchronization primitives to minimize contention.
Data Structure Designconcurrencythreadinglockingdata-structures - System DesignHardModel answerE-commerce Catalog Update System with Asynchronous Image Processing
Design a scalable system for merchants to update product catalogs individually or in bulk, with image validation and CDN delivery.
System Designdistributed-systemsasync-processingconcurrencyscalability - Data Structure DesignMediumModel answerC++ Implementation Details: Containers and Polymorphism
Explain the internal mechanics of std::vector growth, std::unordered_map collision handling, and virtual function dispatch in C++.
Data Structure Designc++data-structuresperformancememory - SQL & DataMediumAuto-gradedDay-7 User Activity Counter
Identify users who recorded at least one activity exactly seven calendar days after joining.
SQL & Datadata-analysisdate-manipulationset-operations - Statistics & ExperimentsMediumModel answerWhy L1 Loss Produces the Median and L2 Loss Produces the Mean
Explain why minimizing absolute deviations yields the median while minimizing squared deviations yields the mean, and how these principles extend to higher dimensions.
Statistics & Experimentsloss-functionscentral-tendencyoptimizationoutliers - System DesignMediumModel answerHigh-Throughput Counter System for Social Engagement
Design a counting service that supports millions of concurrent engagement actions with eventual consistency and sub-50ms read latency.
System Designdistributed-systemseventual-consistencyhigh-throughputcaching - Arrays & HashingEasyAuto-gradedCombine Two Ordered Sequences
Tests your ability to merge two pre-sorted arrays into a single sorted result using the classic two-pointer technique.
Arrays & Hashingtwo-pointerssortingmerge - System DesignMediumModel answerBackground Job API for Hierarchical Data Replication
Design an endpoint that replicates a multi-level data hierarchy with automatic identifier reassignment, progress tracking, and fault tolerance.
System Designbackground-jobsdatabasesapi-design - System DesignHardModel answerBuilding a High-Performance In-Memory Cache
Design a fast, thread-safe in-memory cache with automatic expiration and crash recovery capabilities.
System Designcachingconcurrencydistributed-systems - Arrays & HashingEasyAuto-gradedTrack Target Occurrence Patterns Across Array Regions
Identifies whether a target value occurs at even/odd indices and in the first/second half of an even-length array in one pass.
Arrays & Hashingarray-traversalboolean-flagsearly-termination - Data Structure DesignMediumModel answerBanking API with Thread-Safe Account Operations
Build a thread-safe banking system supporting account creation, deposits, and transfers with atomic balance updates.
Data Structure Designconcurrencythreadinglocksdata-structures - Machine LearningMediumModel answerDesigning a Time-Aware Model for User Conversion Prediction
Design an ML system to forecast user purchase likelihood while handling temporal constraints, severe class imbalance, and business-driven precision requirements.
Machine Learningtime-seriesimbalanced-datafeature-engineeringmodel-evaluation - System DesignMediumModel answerDesign an Idempotent Payment Processing Service
Design a payment service that safely retries failed transactions without double-charging customers, handling scale of ~10,000 transactions per second.
System Designsystem designpaymentsidempotencydistributed systems - Math & Bit ManipulationMediumAuto-gradedCalculate Ride Service Economics and Peak Pricing
Tests unit economics, capacity planning, and dynamic pricing calculations for a transportation service with fixed driver costs and variable demand.
Math & Bit Manipulationunit-economicscapacity-planningprofit-calculation - Trees & GraphsMediumAuto-gradedFind All Downstream Dependents in a Dependency Graph
Tests graph traversal with edge reversal to find all nodes reachable through reversed dependency edges, handling cycles correctly.
Trees & Graphsgraph-traversalbfsdirected-graphcycle-detection - System DesignHardModel answerBuilding a Staleness Detection System for Job Postings
Design a system to identify and handle outdated job listings through signal aggregation, graduated enforcement, and employer dispute resolution.
System Designdistributed-systemsevent-processingstate-machinesreal-time-systems - BehavioralMediumModel answerDiagnosing Memory Issues in an iOS Video Application
Investigate and resolve memory-related crashes in an iOS video feed app by distinguishing between kernel terminations, retain cycles, and access violations.
Behavioraliosmemory-managementdebuggingmobile - Heaps, Sorting & SearchMediumAuto-gradedCount Valid Number Triplets Within Range
Find how many ways to pick three numbers from an array where the maximum minus the minimum stays within a given threshold.
Heaps, Sorting & Searchsortingtwo-pointerscombinatorics - Arrays & HashingEasyAuto-gradedApply Range Paint Operations and Count Final Colors
Tests ability to use difference arrays to efficiently apply multiple range-update operations and decode the final state.
Arrays & Hashingarraysdifference arrayprefix sumshashing - Data Structure DesignMediumModel answerBuild Iterator Abstractions and Composed Traversals
Design an iterator protocol from scratch, implement concrete iterators with different traversal logic, and extend them with features like peeking, filtering, and flattening.
Data Structure Designiteratorsinterface-designlazy-evaluation - Statistics & ExperimentsMediumModel answerDiagnosing a Drop in Mobile Wallet Activity
Systematically investigate a decline in wallet engagement by forming testable hypotheses and identifying data signals that confirm or rule out each explanation.
Statistics & Experimentsmetricsroot-cause-analysisexperimentationdata-quality - System DesignMediumModel answerDesign a High-Concurrency Concert Seat Reservation Platform
Design a ticket booking system that handles millions of simultaneous users competing for limited inventory while preventing double-bookings and race conditions.
System Designhigh-concurrencyinventory-managementdistributed-systemscaching - Data Structure DesignMediumModel answerFix a Ride Dispatch Selection Bug
Reproduce and fix a bug causing incorrect driver-to-order matching in a delivery assignment service.
Data Structure Designdebuggingtestingconcurrencydistributed-systems - Machine LearningHardModel answerModel Selection and Threshold Tuning in Classification Tasks
Analyze cost-sensitive threshold selection, compare ensemble methods for production systems, and explain how regularization penalties shape model weights.
Machine Learningmodel-evaluationensemble-methodsregularizationcost-sensitive-learning