practice a little every day — you've got this ♡
Coding Interview Problems
Practice 6040 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.
- 6040
- Problems
- 2237
- Auto-graded
- 15
- Topics
- 275
- Added today
Showing 1591–1620 of 2790 results
- Data Structure DesignMediumModel answerBuild a Task Registry and Content-Based Duplicate Finder
Design an in-memory task manager with per-user quotas, priority ordering and audit trails, then detect duplicate files using size filtering and streaming hashes.
Data Structure Designhash-mapssorted-containersfilesystemhashing - StringsMediumAuto-gradedCount Character Mismatches Across All Palindrome Mirrors
Tests the ability to reframe a quadratic substring enumeration into a pair-centric counting problem with geometric weight calculations.
Stringscombinatoricsstring-algorithmsoptimization - Dynamic ProgrammingMediumAuto-gradedMaximum Expected Value from Sequential Uniform Draws
Tests understanding of optimal stopping via backward induction and dynamic threshold computation.
Dynamic Programmingoptimal-stoppingbackward-inductionexpected-value - Heaps, Sorting & SearchHardModel answerIdentify Hidden Conflict with Minimal Oracle Queries
Find one conflicting pair among n items using a black-box oracle that tests subsets, minimizing the number of expensive queries.
Heaps, Sorting & Searchbinary-searchoptimizationoracleinformation-theory - Trees & GraphsMediumAuto-gradedRetrieve Kth Smallest Element from Array-Encoded BST
Tests in-order traversal of a binary search tree encoded in parallel arrays, with early termination and iterative stack management.
Trees & Graphsbinary-search-treein-order-traversaliterativestack - Math & Bit ManipulationMediumAuto-gradedMinimize Expected Candidates with Position-Match Feedback
Tests ability to model a greedy partitioning strategy using bitmask bucketing to minimize expected remaining candidates under green-only feedback.
Math & Bit Manipulationgreedybitmaskhashing - Data Structure DesignMediumModel answerBuild a Configurable Disc-Drop Game Engine
Design and implement a gravity-based four-in-a-row game engine with a clean API, local win detection, and support for arbitrary board sizes and run lengths.
Data Structure Designgame-engineapi-design2d-arraywin-detection - Data Structure DesignMediumModel answerBuild a Slash-Command Router with Literal and Wildcard Segments
Implement a trie-based router that matches tokenized bot commands to registered handlers, resolving conflicts between exact and parameterized path segments.
Data Structure Designtrieroutingdesignstring-parsing - Trees & GraphsMediumAuto-gradedCount Reachable Cell Clusters in a Grid
Tests grid-based connected-components detection using flood-fill or DFS, covering neighbor connectivity, visited-state tracking, and iterative traversal.
Trees & Graphsgraphsgriddfsconnected-components - Data Structure DesignMediumAuto-gradedTrain Line Fare System with Dynamic Routes and Weekend Pricing
Tests object-oriented design, index lookups, dynamic data structure updates, and conditional pricing rules in a fare calculation system.
Data Structure Designobject-oriented-designhash-mapsimulation - Arrays & HashingEasyAuto-gradedDaily and Rolling Active User Counts with Zero-Fill
Tests building a complete calendar spine, counting distinct daily users, and maintaining a 30-day rolling active-user window.
Arrays & Hashinghash-mapsliding-windowdate-manipulation - Data Structure DesignMediumAuto-gradedTiered Cache with TTL and Priority Fallback
Implement a hierarchical key-value cache with expiration times, priority-based lookups, and lazy eviction across multiple storage tiers.
Data Structure Designhash-tableheapdata-structure-design - Dynamic ProgrammingMediumModel answerFewest Transfers to Clear Everyone's Net Balance
Given payer/payee/amount triples, compute net balances and return an optimal (minimum-count) set of settlement transfers that zeroes everyone out.
Dynamic Programmingbitmask-dpgreedysubset-sumaccounting - Arrays & HashingHardAuto-gradedThree-in-a-Row: Find the Winner on a 3×3 Grid
Tests whether you can encode all win conditions for a 3×3 grid as data and apply a uniform check to identify a winning player.
Arrays & Hashingarraysgame-theorysimulation - Data Structure DesignMediumModel answerBuild a POS cart with live receipt printing and combo deals
Design a point-of-sale cart that prints an itemized receipt on every tap and then extends to apply non-overlapping combo discounts after each update.
Data Structure Designdata-structuressimulationgreedy - Trees & GraphsMediumAuto-gradedFold and Prune an Arithmetic Expression Tree
Tests recursive AST traversal by simplifying an arithmetic expression tree through constant folding and algebraic identity rules, including cascading rewrites.
Trees & Graphstreesrecursionast - Greedy & IntervalsMediumAuto-gradedPeak Activity Count from Time Intervals
Tests sweep-line techniques for interval overlap detection, event aggregation at boundaries, and proper handling of half-open interval semantics.
Greedy & Intervalsintervalssweep-linesortingevent-processing - Arrays & HashingEasyAuto-gradedClosest Pair of Target Words
Find the minimum index gap between any occurrence of two distinct words in a list using single-pass tracking.
Arrays & Hashingarraystringsingle-passtwo-pointer - Math & Bit ManipulationMediumAuto-graded32-Bit Integer Product via Shift-and-Add
Tests mastery of bitwise arithmetic, sign handling, two's-complement overflow semantics, and O(log n) shift-and-add multiplication without using * or /.
Math & Bit Manipulationbit-manipulationmathoverflowtwo's-complement - StringsEasyAuto-gradedConvert Integer to English Words
Tests ability to decompose integers into groups and translate numeric values into properly formatted English text with correct scaling terms.
Stringsrecursionmathstring-formatting - Stacks & QueuesMediumModel answerGroup Deletion Stack and Boundary Path Collection
Remove consecutive identical-character groups from a string and collect a binary tree's boundary nodes in a specific mirror order.
Stacks & Queuesstackbinary-treestring-manipulationrun-length-encoding - Arrays & HashingMediumAuto-gradedFind User Pairs with Enough Overlapping Interests
Tests your ability to invert a membership index and use co-occurrence counting to efficiently find all pairs sharing at least k common items.
Arrays & Hashinghash-mapsetsco-occurrenceinverted-index - Data Structure DesignMediumModel answerRolling-Window Key-Value Store with Live Average
Design a key-value store that expires entries older than a configurable time window and supports O(1) average-case get, put, and average queries.
Data Structure Designhash-maplinked-listsliding-windowamortized-analysis - Arrays & HashingMediumAuto-gradedTrim a Record List to a Token Budget with a Sliding Window
Tests the sliding-window technique: conditionally compact a list of records to the longest contiguous run whose token sum fits a given budget.
Arrays & Hashingsliding-windowarraystwo-pointers - Stacks & QueuesMediumModel answerCompute Per-Function Runtimes from a Profiler Event Log
Parse a time-ordered sequence of START/END events, compute inclusive and exclusive runtimes per function, and identify the most expensive function by self-time.
Stacks & Queuesstacksimulationprofilingcall-stack - Trees & GraphsMediumModel answerCurrency Conversion Rates via Graph Traversal
Build a weighted graph from currency pairs and answer conversion queries, then extend to directional rates and arbitrage detection.
Trees & Graphsgraph-traversalshortest-pathbellman-fordfloating-point - Data Structure DesignHardModel answerThread-Safe Queue with Lease-Based Message Visibility
Design an in-memory queue that delivers messages with time-limited leases, validates acknowledgments against current lease tokens, and rejects duplicate entries.
Data Structure Designconcurrencyqueuestate-machineidempotency - Stacks & QueuesHardAuto-gradedReconstruct Function Lifetimes from Periodic Stack Snapshots
Tests ability to diff consecutive call-stack snapshots using longest-common-prefix analysis and stack unwinding to produce ordered START/END lifecycle events.
Stacks & Queuesstacksimulationtwo-pointers - Arrays & HashingMediumModel answerTest Plan for Straight-Line vs Path Word Search
Build a TDD plan, concrete cases, property invariants and stress tests for two grid word-search functions that must disagree on key inputs.
Arrays & Hashingtestingtddgridsbacktracking - Data Structure DesignMediumModel answerClassic Data-Structure Drills: Cache, Trie, Heaps, Graphs
Work through fifteen core algorithm patterns—LRU cache, trie, two-pointers, sliding window, topological sort, and more—naming invariants before coding.
Data Structure Designhash-tablestwo-pointerssliding-windowgraphs