practice a little every day — you've got this ♡
Interview Practice Problems
Practice 6128 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.
- 6128
- Problems
- 2272
- Auto-graded
- 15
- Topics
- 275
- Added today
Showing 3181–3210 of 6128 results
- System DesignEasyModel answerRetrying HTTP GET Client with Backoff and Rate-Limit Handling
Write a Python wrapper around requests.get that retries transient failures with exponential backoff, honors Retry-After on 429, fails fast on client errors, and always returns one result shape.
System Designpythonrequestsretriesexponential-backoff - System DesignMediumModel answerReal-Time Ad Engagement Counting Pipeline and Advertiser Dashboard
Design a pipeline that ingests millions of ad click events per second and serves near-real-time, windowed counts per ad to advertisers, with deduplication and late-data handling.
System Designsystem-designstreamingkafkaflink - Trees & GraphsMediumModel answerPrint a Reporting Hierarchy and List Two-Level-Down Pairs
Turn manager rows into a tree, infer the root, print it with depth-based dot indentation, or list every (manager, employee) pair exactly two levels apart.
Trees & Graphstreepreorderiterative-dfshash-map - Trees & GraphsMediumAuto-gradedCheapest Letter Rewrites with Directed Price Rules
Compute the minimum cost to rewrite one string into another with directed priced letter swaps, using shortest paths over 26 letters and handling impossible positions and large totals.
Trees & Graphsgraphfloyd-warshallshortest-pathstrings - System DesignHardModel answerWarm-Restart Persistence for an In-Memory LRU Cache
Design how a single-node LRU cache saves its entries and recency order so it restarts warm after a crash, balancing write-path latency, durability, and bounded recovery time.
System Designlru-cachewrite-ahead-logsnapshotscrash-recovery - Statistics & ExperimentsMediumModel answerRaising Web-to-App Installs: Funnel Diagnosis and A/B Tests
Diagnose where mobile-web customers drop before installing the native app, then design randomized experiments that raise installs while protecting incremental orders and retention.
Statistics & Experimentsab-testingfunnel-analysisexperiment-designattribution - Data Structure DesignMediumAuto-gradedDuplicate Log Suppression Within a Cooldown Window
Simulate a duplicate-log filter driven by an operation script, tracking per-message cooldowns where only accepted messages restart the timer.
Data Structure Designhash-mapdesignsimulationrate-limiting - System DesignMediumModel answerAdding Trip-Level Limits to an Expense Policy Checker
Extend a per-expense policy engine so it also enforces trip-wide spending caps, and redesign its output to report both line-item and trip-level violations with clear explanations.
System Designsystem-designrules-engineaggregationapi-design - System DesignMediumModel answerLive Comment Thread with Instant Local Posting and Reconciliation
Design a live comment feature where new posts show up instantly on the author's screen, then reconcile safely with server acknowledgments, broadcast events, retries, and durable storage.
System Designsystem-designoptimistic-uiidempotencyreal-time - Trees & GraphsMediumAuto-gradedFewest-Hop Route Through Flaky Page Fetches
Run BFS on a link graph to find the lexicographically smallest fewest-hop route, where some pages fail a set number of times before their links load.
Trees & Graphsbfsgraphshortest-pathretries - SQL & DataEasyModel answerSeries vs DataFrame, WHERE vs HAVING, and Finding Repeated Emails
Three short data-engineering questions: contrast pandas Series and DataFrame, explain when SQL applies WHERE versus HAVING, and write a query that reports emails occurring more than once.
SQL & Datasqlpandasgroup-byhaving - Trees & GraphsMediumAuto-gradedRainbow Walks of Length Three in a Typed Graph
Count ordered 4-vertex walks along edges in an undirected graph whose vertices carry one of four labels, where each walk uses every label exactly once.
Trees & Graphsgraphcountingcombinatoricsadjacency-list - SQL & DataEasyAuto-gradedCurrent Top Earner in Each Department
Reduce salary history to each person's current pay per department, then choose the highest-paid person in each department, with exact tie and ordering rules.
SQL & Datagroupinghash-mapdata-manipulationtop-n-per-group - SQL & DataMediumModel answerDaily New, Retained and Churned Devices by Platform
Write one SQL query that classifies devices as new, retained or churned for 2025-09-01 from a raw event log, and reports net growth overall and per platform.
SQL & Datasqlcteretentiondeduplication - Math & Bit ManipulationEasyAuto-gradedEventual Winner Odds in a Draw-Two Card Duel with Replays
Compute the probability that the first of two drawers eventually wins a rank-comparison game with replayed ties, using counting and a symmetry argument.
Math & Bit Manipulationprobabilitysymmetrycountingmath - Machine LearningEasyModel answerWhich Ensemble Method Relies on Bootstrap Aggregation?
Pick the model that is a canonical example of bootstrap aggregating from four options, and justify the choice by explaining how bagging reduces variance.
Machine Learningbaggingensemble-methodsrandom-forestbias-variance - Linked ListsMediumModel answerSequence Storage Trade-offs: Contiguous Arrays vs Pointer Chains
Contrast contiguous arrays, linked lists, and unrolled lists for indexed reads, inserts, growth, traversal speed, and cache behavior, and say when each one wins.
Linked Listsarrayslinked-listsunrolled-linked-listcache-locality - System DesignEasyModel answerContainerizing and Shipping a Python Model Server
Explain how containers work, tighten a naive Dockerfile for an ML inference API, and outline a CI/CD pipeline that safely ships code and model changes.
System Designdockerci-cdmlopscontainers - Data Structure DesignMediumAuto-gradedSlide a Block in a Grid and Filter Repeated Log Calls
Move a rectangular block inside a 2D grid without corrupting overlapping data, then run a sliding-window duplicate filter over a list of timestamps.
Data Structure Designmatrixin-placesliding-windowdeque - System DesignHardModel answerFrom Shader Source to GPU Code: Compilers and Modern Graphics APIs
Describe how shader source becomes GPU machine code, contrast explicit and legacy graphics APIs, and sketch a small shader compiler with front end, IR, and SPIR-V back end.
System Designshader-compilergraphics-apispir-vvulkan - SQL & DataMediumAuto-gradedDaily Leading Buyers Among Active Subscribers
Filter orders by inclusive membership windows, total quantities per day and customer, and return every customer tied for each day's maximum, in sorted order.
SQL & Dataaggregationgroup-bytiesdate-range-filter - System DesignMediumModel answerMini Ledger Service: Credits, Debits and Safe Balances
Design and build a small full-stack ledger app with an API, storage, a basic UI and tests that records credits and debits and never lets an account balance drop below zero.
System Designapi-designtransactionsidempotencyconcurrency - BehavioralMediumModel answerFour Behavioral Stories: Impact, Coaching, Conflict, Feedback
Prepare structured, example-driven answers about a high-impact project, mentoring someone, resolving a disagreement, and responding to feedback that your communication is unclear.
Behavioralbehavioralstar-methodmentorshipconflict-resolution - Trees & GraphsMediumAuto-gradedEarliest Finish Time for a Dependent Task Pipeline
Find the minimum time to complete all tasks with durations and prerequisites under unlimited parallelism, or detect a circular dependency, using longest path in a DAG with topological ordering.
Trees & Graphstopological-sortgraphdaglongest-path - Heaps, Sorting & SearchMediumAuto-gradedFirst Index at Least Target in a Padded Sorted Stream
Find the first index with value at least the target in a sorted sequence of hidden length, using doubling probes followed by binary search.
Heaps, Sorting & Searchbinary-searchexponential-searchsorted-arrayinvariants - System DesignMediumModel answerShared Task Board with Live Sync: Architecture Walkthrough
Design a backend for team task lists where members add, assign, schedule, reorder and complete items, with changes appearing live across web and mobile and surviving offline use.
System Designsystem-designreal-time-syncconcurrencycrdt - BehavioralMediumModel answerBehavioral Prep: Project Stories and Team Lead Scenarios
Build structured answers about your best and hardest projects, what you'd redo, handling a difficult teammate, and splitting work as a lead.
BehavioralbehavioralleadershipSTARconflict-resolution - System DesignHardModel answerBuild a Fault-Tolerant Block Store for Massive Tabular Datasets
Design a distributed block-based file store for huge structured datasets, covering versioned metadata, caching, replica repair, locality-aware job scheduling, and resource-aware balancing.
System Designdistributed-storagereplicationmetadatacaching - BehavioralMediumModel answerWinning a Technical Disagreement Without Damaging the Relationship
Tell a structured story about a real disagreement where you thought your approach was better, how you built agreement, and what you learned, while keeping the working relationship intact.
Behavioralbehavioralconflict-resolutioninfluencestakeholder-management - Data Structure DesignMediumModel answerSingleton, Factory Method and Strategy: Code and Compare in Java
Write Java versions of a lazy thread-safe Singleton, a Factory Method and a Strategy, weigh them against each other, then refactor a Singleton dependency to use injection.
Data Structure Designdesign-patternsjavasingletonfactory-method