practice a little every day — you've got this ♡
Interview Practice Problems
Practice 6066 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.
- 6066
- Problems
- 2248
- Auto-graded
- 15
- Topics
- 275
- Added today
Showing 1651–1680 of 3818 results
- Arrays & HashingMediumModel answerCart Pricing Engine: Offers, Cheapest Deal, Aisle Sort
Parse cart records, total units and price in integer cents, apply the best percent-off or buy-N-get-M-free deal per product, then sort items by aisle with frozen goods at the end.
Arrays & Hashingparsingmoney-arithmeticextensible-designsorting - System DesignMediumModel answerBuilding a Fan-Out Service That Indexes a Huge Directory Tree
Design an asynchronous service where workers recursively split a directory scan into child tasks, with safe retries, deduplication, progress reporting and scaling to billions of files.
System Designsystem-designdistributed-systemsmessage-queueidempotency - System DesignMediumModel answerStorage Backend for a Large-Scale Time-Series Metrics Platform
Design the storage layer for a metrics platform that ingests 100k points per second, serves tag-filtered time-range queries, downsamples older data and enforces tiered retention.
System Designtime-seriesstoragepartitioningdownsampling - Machine LearningMediumModel answerPadded-Token Smoothed Softmax Loss with Gradients in NumPy
Write a stable NumPy loss for sequence models that skips padded positions, smooths the target distribution, rescales logits by temperature, and returns the exact gradient with respect to the logits.
Machine Learningcross-entropylabel-smoothingnumpysoftmax - BehavioralHardModel answerCustomer-Facing Data Science Screen: Motivation, Stories, and a Pitch
Answer a multi-part screening round for a customer-facing technical data science role, covering motivation, past stories, a sales scenario for a large retailer, and career goals.
Behavioralbehavioralcustomer-facingstakeholder-managementconsultative-selling - Machine LearningMediumModel answerChoosing and Validating a Loan Default Model Under Regulation
Compare logistic regression, random forests and boosted trees for predicting loan default, and explain how to validate them, treat rare defaults, and keep decisions explainable.
Machine Learningcredit-riskgradient-boostingclass-imbalancemodel-interpretability - Machine LearningMediumModel answerSplitting a Large Transformer: Intra-Layer vs Inter-Layer Sharding
Contrast sharding weights within each transformer layer against assigning consecutive layers to different devices, covering communication, bubbles, memory, and inference latency.
Machine Learningdistributed-trainingtensor-parallelismpipeline-parallelismtransformers - Statistics & ExperimentsMediumModel answerInvestigating Swings in a Loan Approval Rate Over Two Years
Explain how you would diagnose a dip, a bump and a sustained rise in a monthly approval rate by splitting numerator, denominator and mix, validating data, and separating seasonality from causal effects.
Statistics & Experimentsroot-cause-analysisratio-metricstime-seriessegmentation - Trees & GraphsEasyModel answerLone-Parity Filter and Leftmost Node Per Tree Depth
Write one function that returns the elements whose even/odd class appears exactly once in an array, plus the first node's value at every depth of a binary tree.
Trees & Graphsbfsbinary-treelevel-ordercounting - System DesignMediumModel answerShipping Multi-GB Model Artifacts to a Large Edge Fleet
Design a secure, resumable pipeline that delivers 0.5–50 GB model bundles from a central registry to over 10,000 edge nodes, with staged rollouts, rollback, and fleet-wide monitoring.
System Designdistributed-systemscontent-addressable-storagerolloutsedge-deployment - Statistics & ExperimentsMediumModel answerWhy Scaling Sample Singletons by 10 Overcounts Rare Queries
Explain the bias of scaling sample singleton counts from a 10% log sample, then build, stress-test and simulate better estimators of the true number of once-only queries.
Statistics & Experimentssamplinggood-turingfrequency-of-frequenciesbootstrap - Machine LearningHardModel answerBuild a Multimodal Pipeline to Flag and Handle Unsafe Videos
Design an ML-driven system that screens uploaded and already-published videos for policy violations, blends automation with human reviewers, supports appeals, and resists evasion.
Machine Learningml-system-designcontent-moderationmultimodalhuman-in-the-loop - System DesignHardModel answerStreaming Keyword-Set Matcher for Interleaved Rules and Events
Build a processor for a stream of subscriptions and log events that assigns IDs, acknowledges each subscription, tags matching events, and scales to heavy traffic with deletions.
System Designinverted-indexstream-processingscalingdeletion - Statistics & ExperimentsEasyModel answerFour Quick Probability Drills: Decay, Regression, Doors, Dice
Answer four short probability and statistics questions: surviving atoms after repeated halvings, two population regression slopes, a three-door game show, and rolls needed to see every die face.
Statistics & Experimentsprobabilitybinomialols-regressionmonty-hall - System DesignHardModel answerBuild a Clickstream and Orders Warehouse for an Online Shop
Design a warehouse for a retail platform's clickstream and orders that serves two fixed queries: monthly unique Asian viewers of an item, and the current top three orders by value.
System Designdata-warehouseevent-schemaidentity-stitchingdimensional-modeling - Machine LearningHardModel answerBuilding a GPU Memory Budget for LLM Fine-Tuning
Work out how much accelerator memory a language-model fine-tuning job needs, covering weights, gradients, optimizer state, activations, buffers, and parallelism, for both full and LoRA-style tuning.
Machine Learningllmfine-tuninggpu-memorylora - System DesignEasyModel answerFrom C++ Source File to Running Process: The Build Pipeline
Walk a C++ file through preprocessing, compilation, assembly and linking, then explain object files, linker errors and the process address space at launch.
System Designc++compilationlinkingelf - Machine LearningHardModel answerBuild a Nearby-Restaurant Ranking Pipeline for an App Homepage
Design a sub-100ms ML pipeline that picks and ranks open, deliverable restaurants for each user's homepage carousel, covering retrieval, ranking, cold start, and evaluation.
Machine Learningrecommender-systemscandidate-generationrankinggeospatial - System DesignHardModel answerBuilding a Throttling Service for a Multi-Node API Fleet
Design a throttling layer that caps per-key request rates with burst tolerance, first on one machine, then across many app servers, covering consistency, clock drift, failures, and observability.
System Designrate-limitingtoken-bucketsliding-windowredis - SQL & DataMediumModel answerRank Advertisers by User Complaint Rate Over a 7-Day Window
Write SQL that finds the worst advertisers by report-to-visit rate, picks each one's worst ad, and builds a daily leaderboard without double-counting visits or reports.
SQL & Datasqlwindow-functionsaggregationjoins - StringsHardModel answerChunk-Safe Tokenizer for Fenced Code Blocks
Design a stateful tokenizer that turns arbitrarily chunked Markdown into text and code-block events, correctly handling fences split across chunk boundaries.
Stringsstreamingstate-machinestring-parsingmarkdown - SQL & DataMediumModel answerWeekly Ad Click Rate: Overall and Per Campaign Category
Write SQL that deduplicates ad event logs, restricts them to a one-week UTC window, and computes click-through rate overall and per campaign type, with safe handling of zero impressions.
SQL & Datasqlaggregationdeduplicationconditional-aggregation - Data Structure DesignMediumModel answerFrequency-Ranked Shuffle Without Repeats Per Round
Build a player that ingests users' song lists and serves songs from most to least popular, never repeating a song until every known song has played once in the round.
Data Structure Designheaplazy-deletionhash-mapdesign - BehavioralMediumModel answerNavigating a Technical Disagreement With a Teammate
Craft a 2–3 minute behavioral answer about a real disagreement with a peer or stakeholder, showing how you resolved it, what changed, and what you learned.
Behavioralbehavioralconflict-resolutioncommunicationcollaboration - BehavioralMediumModel answerNavigating a Technical Standoff During Pull Request Review
Describe a time you and a colleague disagreed strongly about a pull request, how you separated real risk from taste, used evidence to resolve it, and kept the working relationship healthy.
Behavioralbehavioralcode-reviewconflict-resolutioncommunication - System DesignHardModel answerDesign a Cloud Workstation Platform for Engineers
Design a service that gives engineers on-demand remote workstations they reach from a laptop, keep across stops and restarts, and have reclaimed automatically when idle.
System Designsystem-designcontrol-planeprovisioningpersistent-storage - System DesignMediumModel answerHardening a Multithreaded Task Dispatcher with Rate Limiting
Review a flawed Python task dispatcher for races, deadlocks and limiter bugs, then write tests, derive makespan and success-rate formulas, and design telemetry.
System Designconcurrencydebuggingrate-limitingrace-conditions - System DesignHardModel answerBuilding a Reliable Credit Top-Up Billing Backend
Design a billing service that sells API credits through an external payment provider, crediting each successful payment exactly once despite retries, timeouts, and partial failures.
System Designidempotencydouble-entry-ledgerwebhooksreconciliation - System DesignMediumModel answerFast Dashboards and Auditable Finance Tables from One Event Stream
Design a marketplace order-event pipeline that serves five-minute operational metrics and a reproducible next-morning finance table, weighing batch, streaming, and hybrid approaches.
System Designdata-pipelinestream-processingbatch-processinglambda-architecture - BehavioralMediumModel answerDescribe How You Raised Team Spirits During a Difficult Stretch
A behavioral prompt asking you to share a real example of improving team morale, covering what you did, how you stayed honest about problems, and what measurably changed.
Behavioralbehavioralmoraleteamworkleadership