practice a little every day — you've got this ♡
Interview Practice Problems
Practice 5974 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.
- 5974
- Problems
- 2212
- Auto-graded
- 15
- Topics
- 269
- Added today
Showing 181–210 of 3762 results
- Dynamic ProgrammingHardModel answerMaximize Allocation Across Server Pools with Migration Limits
Aggregate daily resource usages and calculate optimal allocations under unrestricted and migration-bounded pool selection constraints using dynamic programming.
Dynamic Programmingarraysdynamic-programminggreedy-intervals - Data Structure DesignMediumModel answerBuild a Weighted Hash Ring for Sharding Keys Across Servers
Design a hash ring with weighted virtual nodes that assigns keys to servers, supports adding and removing servers with little key movement, and handles collisions and concurrency.
Data Structure Designconsistent-hashingvirtual-nodesbinary-searchthread-safety - Machine LearningMediumModel answerJoint Image-Text Embeddings: Training, Losses, and Retrieval Pitfalls
Explain how a dual-encoder image-text model is trained and used, compare contrastive losses, and discuss embedding retrieval weaknesses, alternatives, and popularity bias.
Machine Learningmultimodalcontrastive-learningdense-retrievalpopularity-bias - BehavioralMediumModel answerShipping Under Pressure: Ethics, Risk, and Thankless Work
Describe a time you faced an ethical risk, a serious process failure, or a task nobody wanted, and explain how you judged it, persuaded others, and changed team practice.
Behavioralbehavioralethicsinfluence-without-authorityownership - Data Structure DesignMediumModel answerFunction Composition Twice and Core Container Cost Comparison
Write a helper that feeds a function's output back into itself, explain closures and side effects, then compare arrays, linked lists, stacks and queues by operation cost.
Data Structure Designhigher-order-functionsclosuresside-effectscomplexity-analysis - Statistics & ExperimentsHardModel answerDecomposing Revenue Drops and Measuring Promotional Cannibalization
Perform a path decomposition on business metrics to isolate mix effects, evaluate promotional unit economics, and design an experiment to test cannibalization.
Statistics & ExperimentsA/B TestingExperiment DesignAttributionBusiness Analytics - System DesignMediumModel answerCutting Read Latency in a Normalized Relational Schema
Speed up the hottest reads of a live service backed by a normalized database, and explain the write-path cost, freshness impact and rollout plan of each change.
System Designdatabase-designdenormalizationcachingread-latency - BehavioralMediumModel answerGreenlight a Plant-Based Burger? Build the Business Case
Decide as the business owner whether to fund a plant-based burger now, backing the call with customer, NPV, operations, brand and staged-rollout reasoning.
Behavioralproduct-strategynpvcannibalizationstaged-rollout - Machine LearningMediumModel answerBuilding Dependable Tool-Using LLM Agents End to End
Explain how an LLM agent invokes tools, keeps calls well-formed, recovers from bad calls, and stops runaway tool loops, with concrete engineering trade-offs.
Machine Learningllm-agentstool-callingstructured-decodingreliability - Statistics & ExperimentsMediumModel answerRevenue-Share Merchant Loans: Metrics, Risk, Offers, Profit Drop
Analyze a platform's revenue-share working-capital loan for merchants: design a monitoring dashboard, flag risky borrowers, compare offer formats, and diagnose a two-quarter profit decline.
Statistics & Experimentsproduct-analyticscredit-riskexperimentationmetrics-design - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - BehavioralMediumModel answerFive Behavioral Stories Every ML Engineer Should Have Ready
Build structured, quantified stories for pride, difficult colleagues, tight deadlines, shifting scope and mentoring, each ending with a lesson and a concrete change in behavior.
Behavioralbehavioralstar-methodleadershipcommunication - System DesignMediumModel answerExactly-Once Disbursements Across Flaky Banking Rails
Design a payout service that never moves money twice despite client retries, parallel workers, and gateway timeouts during peak payroll bursts.
System Designidempotencypaymentsdistributed-systemsstate-machine - System DesignEasyModel answerSubtracting Two Sensor Feeds with Late-Arriving Corrections
Design the contract for subtracting two timestamped numeric streams, including missing and duplicate timestamps, and a versioned, idempotent way to publish corrections for late events.
System Designstreamingidempotencyevent-timedata-contracts - System DesignMediumModel answerProfiling CPU, Cache, and Disk Stalls in a Low-Latency Engine
Build a measurement-first diagnosis and fix plan for three latency problems in a C++ trading service: CPU saturation, cache-hostile memory use, and slow synchronous log writes.
System Designperformanceprofilinglow-latencylinux - Machine LearningHardModel answerDesigning an ML-Driven Workload Allocator for Delivery Drivers
Design a system that forecasts stop service times with ML and feeds them to a constrained optimizer to split a shift's deliveries across drivers, balancing punctuality and fairness.
Machine Learningoptimizationgradient-boostingcold-startdistribution-shift - System DesignMediumModel answerBuilding an Automated Playbook Miner for Enterprise AI Agents
Design an end-to-end system that mines reusable agent playbooks from a company's traces and documents, tests them offline, ships them safely to agents, and keeps them current.
System Designllm-systemsagentsml-system-designevaluation - System DesignHardModel answerCost Model for a Two-Matmul MLP Block Across Devices
Derive FLOPs, bytes moved, and collective traffic for a plain two-matmul MLP under several partitioning schemes, then decide which hardware limit binds.
System Designml-systemstensor-parallelismrooflinecollectives