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 331–360 of 5986 results
- Stacks & QueuesMediumAuto-gradedCollapse Adjacent Edits Before Applying Them to a Text Buffer
Simulate a queue of insert and format edits, merging adjacent inserts and dropping repeated adjacent formats, then return the final text and ordered list of applied styles.
Stacks & Queuesstacksimulationcommand-patternstrings - System DesignMediumModel answerBuild a Thread-Safe Embedded Key-Value Engine from Hash Maps
Design a concurrent embedded key-value store whose indexes are built only from hash maps, covering sharding, crash recovery, log compaction, expiry, and a testing plan.
System Designkey-value-storeconcurrencyhash-mapdurability - Machine LearningHardModel answerBuild and Validate a Multi-Step Sequence Forecaster in PyTorch
Design an end-to-end forecasting pipeline for a noisy time series: frame the target, avoid leakage, choose a model, write a PyTorch training loop, and evaluate it with time-aware validation.
Machine Learningtime-seriesforecastingpytorchleakage - Data Structure DesignMediumAuto-gradedRing-Buffer Deque with Constant-Time Indexing
Build a double-ended queue on a resizable circular array so index lookups are O(1), then replay a command list against it and report each result.
Data Structure Designcircular-bufferdequedynamic-arrayamortized-analysis - Trees & GraphsMediumAuto-gradedExtract Text From Matching Elements in Messy Markup
Parse a forgiving HTML string into an element tree in one pass, then collect each matching element's combined text in document order using an iterative depth-first traversal.
Trees & Graphsparsingtreedfsstack - Trees & GraphsMediumAuto-gradedTotal Value of Bit-Strings Along a Tree's Leaf Paths
Decode a level-order bit tree with skipped None slots, then sum the binary values read along each root-to-leaf path, testing BFS parsing and DFS with a running accumulator.
Trees & Graphsbinary-treedfsbfslevel-order-parsing - System DesignMediumModel answerStock Ledger and Support Chat: Two Backend Services
Design an oversell-proof book stock service with search, plus a real-time one-to-one support chat with delivery receipts, history and offline handling.
System Designsystem-designconsistencywebsocketssql-vs-nosql - Heaps, Sorting & SearchMediumAuto-gradedEvaluate a Broken-Line Curve at a Query Position
Sort scattered points by x, then find the y on the connecting line at a query x, interpolating inside the range and extending the end segments outside it.
Heaps, Sorting & Searchbinary-searchsortinginterpolationgeometry - Math & Bit ManipulationEasyModel answerImplement Iterative and Recursive Factorial with Integer Squares
Write iterative and recursive factorial functions alongside a sequence of integer squares, focusing on input validation, edge cases, and stack vs. loop complexity.
Math & Bit Manipulationmathrecursioniterationpython - Machine LearningHardModel answerDesign a Citation-Verified RAG Assistant for Litigation Review
Design a read-only, retrieval-grounded LLM system that summarizes case files, builds timelines, flags conflicting statements, and drafts briefs with verifiable citations and strong isolation.
Machine Learningragllm-system-designprompt-injectioncitation-verification - Greedy & IntervalsMediumAuto-gradedCombine Overlapping Time Intervals
Consolidate overlapping and adjacent closed intervals into a minimal list of disjoint intervals using sorting.
Greedy & Intervalsarraysgreedy-intervalssorting - Heaps, Sorting & SearchMediumAuto-gradedOrder Transformed Values of a Sorted Array
Apply a quadratic mapping to a sorted list of numbers and return the sorted results in O(n) time.
Heaps, Sorting & Searchtwo-pointersarraysmath - Trees & GraphsMediumAuto-gradedClosest-Pair Dispatch of Couriers on a Walled Grid
Match couriers to parcels by repeatedly choosing the globally closest pair, using BFS shortest paths on a grid with walls and deterministic tie-breaking.
Trees & Graphsbfsgridgreedysorting - Statistics & ExperimentsMediumModel answerBacklog Prioritization and Experiment Plan for a Two-Sided Marketplace
Describe how you would pick, ship and measure improvements for a marketplace's new-seller funnel while protecting buyer trust, using a scoring framework and a guarded experiment.
Statistics & Experimentsproduct-managementprioritizationab-testingmarketplace - Stacks & QueuesMediumAuto-gradedNormalize a Filesystem Location String
Reduce an absolute Unix-style path to its canonical form by resolving repeated slashes, current-directory and parent-directory segments, using a stack.
Stacks & Queuesstackstring-parsingsimulationpaths - SQL & DataMediumAuto-gradedTop Earners per Department with Ties
Given department and employee tables as lists, return every employee who earns the maximum salary in their department, keeping ties and handling duplicate names.
SQL & Datagroup-byhash-maptiesjoins - Math & Bit ManipulationMediumAuto-gradedCount Starting Numbers for Consecutive Sums
Determine how many positive integers can serve as the starting element of a sequence of consecutive positive integers that sums to a target value.
Math & Bit Manipulationmathnumber-theoryarithmetic-progression - System DesignMediumModel answerBuild a Multi-User Live Text Editor That Never Loses Edits
Design a browser-based rich-text editor where many people edit one document simultaneously, stay in sync, keep durable history, and survive disconnects and server failures.
System Designsystem-designreal-timecollaborationcrdt - Trees & GraphsMediumAuto-gradedFind the k-th Value in a Level-Order Encoded Tree's Inorder Sequence
Decode a level-order binary tree with null gaps, then return the k-th value in its inorder sequence, or -1 if fewer than k nodes exist.
Trees & Graphsbinary-treeinorder-traversaliterative-traversalstack - Machine LearningEasyModel answerBuilding a Home Sale Price Estimator End to End
Design a regression pipeline that estimates residential sale prices, covering missing data, categorical encoding, feature ideas, time-aware validation, metrics, and interpretability.
Machine Learningregressionfeature-engineeringtime-series-validationtarget-encoding - Arrays & HashingMediumAuto-gradedCascading Tile Crush on a Grid
Simulate a tile-crush game: mark all runs of 3+ equal tiles, clear them, drop tiles with gravity, and repeat until stable, counting removed tiles.
Arrays & Hashingsimulationmatrixtwo-pointersgrid - System DesignMediumModel answerArchitecting a Video Safety Screening Pipeline at Scale
Design a global, multi-modal system that screens uploaded videos for policy violations with ML, escalates uncertain cases to human reviewers, and keeps a tamper-proof decision history.
System Designml-system-designcontent-moderationmultimodalhuman-in-the-loop - Machine LearningEasyModel answerBuild a Causal Multi-Head Attention Layer from Scratch
Write a multi-head self-attention module with Q/K/V projections, scaled scores, and a causal mask so each token sees only itself and earlier tokens, then explain how it works.
Machine Learningtransformersattentionpytorchcausal-masking - SQL & DataMediumModel answerReferral funnel SQL: LEFT JOIN date windows and country filters
Write five SQL queries over users, referrals and orders that measure referral conversion and revenue without losing zero-activity rows, with no window functions.
SQL & Datasqlleft-joingroup-byhaving - BehavioralMediumModel answerWalking a Panel Through a Data Project You Led
Prepare a 10-15 minute panel talk on one analytics project you led, covering problem, data, method, measured impact, stakeholder handling and lessons.
Behavioralbehavioralpresentationstorytellingstakeholder-management - Trees & GraphsMediumAuto-gradedInherited Permissions Across a Group Hierarchy
Answer permission queries over a DAG of groups where each group inherits from its parents, using graph traversal with memoization or caching.
Trees & Graphsgraphdagdfsmemoization - Trees & GraphsMediumAuto-gradedBest Hub-and-Spokes Value Sum with a Spoke Limit
Choose a hub node and up to k adjacent nodes to maximize the total node value, which tests per-node greedy selection over adjacency lists.
Trees & Graphsgraphgreedysortingadjacency-list - Dynamic ProgrammingMediumAuto-gradedBiggest Solid Block in a Binary Grid
Find the area of the largest square made only of '1' cells in a grid of character digits, using a dynamic programming recurrence that can be compressed to a single row of state.
Dynamic Programmingdynamic-programmingmatrixspace-optimization2d-grid - System DesignHardModel answerDesigning a Customer Account Remapping and History Preservation Engine
Architect an idempotent system to merge platform customer identities while maintaining account ledgers, resolving entity conflicts, and preserving query accuracy.
System Designsystem-designdistributed-systemsdatabase-designledger - Stacks & QueuesEasyAuto-gradedLeftover Brackets After Pairing Up a Parenthesis String
Count the parentheses left over after forming the maximum number of valid "(" before ")" pairs, testing a greedy counter scan or stack over a string.
Stacks & Queuesstackgreedystringsparentheses