practice a little every day — you've got this ♡
Coding Interview Problems
Practice 5966 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.
- 5966
- Problems
- 2209
- Auto-graded
- 15
- Topics
- 271
- Added today
Showing 1–30 of 2759 results
- Math & Bit ManipulationMediumAuto-gradedLargest Letter Coverage from Non-Overlapping Words
Choose words with no repeated letters that share no letters with each other, maximizing total letters covered; tests bitmask encoding and pruned backtracking.
Math & Bit Manipulationbitmaskbacktrackingset-packingpruning - Data Structure DesignMediumModel answerDeadlock-Free Atomic Funds Movement Between Shared Accounts
Design a concurrent transfer operation over an in-memory account store that never loses updates, is all-or-nothing, preserves total money, and cannot deadlock.
Data Structure Designconcurrencylockingdeadlockatomicity - Greedy & IntervalsMediumAuto-gradedConsolidate Overlapping Time Intervals
Evaluate ability to sort and combine overlapping or adjacent half-open numerical intervals in linear-arithmetic time.
Greedy & Intervalsintervalssortingarraysgreedy - Heaps, Sorting & SearchEasyAuto-gradedAdaptive Merge Sort with Comparison Counter
Count element-level comparisons during an adaptive divide-and-conquer merge sort.
Heaps, Sorting & Searchsortingdivide-and-conquerrecursionarrays - Arrays & HashingMediumAuto-gradedShortest Window Holding Exactly k Different Values
Find the shortest contiguous slice of an integer list containing exactly k different values, using a sliding window with frequency counts.
Arrays & Hashingsliding-windowhash-mapsubarraytwo-pointers - Math & Bit ManipulationEasyAuto-gradedTheoretical Mean and Variance of Permutation Inversions
Derive and evaluate the closed-form expected value and variance for the number of inversions in a uniformly random permutation.
Math & Bit Manipulationmathcombinatoricsstatisticsprobability - Data Structure DesignMediumModel answerPython ABCs and the Three Kinds of Methods Explained
Explain how abstract base classes work in Python and how instance, class and static methods differ in binding, inheritance behavior and typical use.
Data Structure Designpythonoopabstract-classesclassmethod - Trees & GraphsHardModel answerConstruct Non-Conflicting Queens Configurations
Compute all possible configurations of n non-attacking queens on an n x n board using stateful depth-first search.
Trees & Graphsbacktrackingrecursiondepth-first-search - Data Structure DesignMediumModel answerHandling Seekable Body Replays on 307 Redirects in Python requests
Debug and implement stateful body rewind logic for seekable file-like streams when executing HTTP 307 redirects in an HTTP client library.
Data Structure Designpythonhttpdebuggingstreams - Arrays & HashingEasyAuto-gradedCheck a Call Against a Catalog of Function Signatures
Decide whether an ordered list of argument types fits any function in a catalog, given required, trailing optional, and variadic parameters with exact type matching.
Arrays & Hashingsimulationarray-scanningsignature-matchingedge-cases - Trees & GraphsMediumAuto-gradedStop Listing and Indented Reporting Tree from Raw Inputs
Parse a JSON string into formatted stop lines and turn employee rows into a sorted, indented reporting-tree outline using an adjacency list and iterative DFS.
Trees & Graphsjsontreedfssorting - Linked ListsMediumAuto-gradedMin, Reverse, and Staircase Search in One Function
Compute a list's minimum, its reversal, and whether a target exists in a row- and column-sorted matrix, all in one combined function.
Linked Listslinked-listreversalmatrix-searchtwo-pointers - Trees & GraphsMediumAuto-gradedSmallest-First Course Ordering With Cycle Check
Produce the lexicographically smallest valid course order from prerequisite pairs, or an empty list if a cycle makes it impossible, using a topological sort with a min-heap.
Trees & Graphstopological-sortgraphheapcycle-detection - Data Structure DesignMediumAuto-gradedLocate a Traveler's Airport by Timestamp
Process a batch of operations that load travel records and answer per-user point-in-time location queries using grouping, sorting and binary search.
Data Structure Designbinary-searchhash-mapintervalsdesign - Arrays & HashingMediumAuto-gradedShortest Subarray with K Unique Values
Find the minimum length of a contiguous subarray containing at least K unique elements using a sliding window.
Arrays & Hashingsliding-windowtwo-pointershash-tablearrays - Trees & GraphsMediumAuto-gradedMinimum Grid Manhattan Distance Between Target Characters
Find the minimum Manhattan distance between any pair of target characters in a 2D character grid.
Trees & Graphsbfsmatrixdistance-transformgraphs - Heaps, Sorting & SearchMediumAuto-gradedRolling Window Mean After Dropping the Largest k
Compute the mean of each fixed-size window after discarding its k largest values, which needs a structure that supports fast insertion, deletion and sum-of-smallest queries.
Heaps, Sorting & Searchsliding-windowfenwick-treeorder-statisticsheaps - Data Structure DesignMediumAuto-gradedRoom Assignment and Leaderboard for Streaming Sessions
Simulate a stream of operations that assigns sessions to the lowest-numbered free room and reports the top-k streams by total duration, tested with heaps and lazy deletion.
Data Structure Designheapdesignsimulationlazy-deletion - Dynamic ProgrammingMediumAuto-gradedProcess Morse Signals and Provider Coverage
Evaluate string encoding, ambiguous Morse code decoding via dynamic programming, and spatial coverage checking for network members.
Dynamic Programmingdynamic-programmingstringsarraysgeometry - Trees & GraphsHardModel answerGrid Partitioning and Navigating Safe Subregions
Construct a valid contiguous layout for multiple crop zones on a grid and find the shortest path avoiding edge-touching zones.
Trees & Graphstrees-graphsgridbfsconstructive-algorithms - Data Structure DesignMediumModel answerDesign a Blackjack Game Engine
Architect an object-oriented Blackjack engine handling multi-deck shoes, split hands, and soft/hard total calculations.
Data Structure DesignData Structure DesignObject-Oriented DesignState Machine - Trees & GraphsHardAuto-gradedDictionary Words Hidden in a Letter Grid
Find every dictionary word that can be traced through adjacent, non-repeating cells of a letter grid, which rewards sharing prefixes across words instead of searching per word.
Trees & Graphstriebacktrackingdfsgrid - Trees & GraphsMediumModel answerGraph Toolkit for Scene and Dependency Graphs: Sort, Traverse, Route
Implement topological sort, BFS, DFS and Dijkstra on a dependency graph, then discuss CSR versus adjacency lists, CPU/GPU parallel traversal, and deterministic testing.
Trees & Graphstopological-sortbfs-dfsdijkstracsr - Data Structure DesignEasyAuto-gradedSliding Five-Minute Hit Tally for Each Caller
Process a batch of hit and query operations, returning each caller's number of hits within an inclusive 300-second window, using per-caller queues with lazy expiry.
Data Structure Designhash-mapqueuesliding-windowsimulation - StringsMediumAuto-gradedAlphabetically Greatest Tail of a String
Find the lexicographically greatest suffix of a long lowercase string in linear time by comparing candidate start positions without copying and skipping eliminated blocks.
Stringsstringstwo-pointersgreedysuffix - Data Structure DesignHardAuto-gradedBest-Fit Block Manager with Splitting and Merging
Simulate a best-fit memory manager on a fixed address range, handling splits, exact-start frees, invalid frees, and merging of neighboring free blocks using plain lists.
Data Structure Designsimulationbinary-searchmemory-allocatorbest-fit - Math & Bit ManipulationMediumAuto-gradedImplement Binary Exponentiation
Evaluate floating-point powers with integer exponents using logarithmic time binary exponentiation without standard library power methods.
Math & Bit Manipulationmathbinary-exponentiationbit-manipulation - Data Structure DesignMediumModel answerBuild a Batch Grayscale Thumbnailer with Worker Pools
Design and code a Pillow-based batch tool that grayscales and shrinks images, then scale it to many large files with multiprocessing, robust error handling, bounded memory and benchmarks.
Data Structure Designpythonpillowmultiprocessingconcurrency - Greedy & IntervalsMediumAuto-gradedPair Lab Visits with Follow-Up Consultations from 10-Minute Slots
Validate and merge 10-minute availability slots, expand them into 30-minute visits, and list every lab-then-consultation pairing with a wait of 0 to 60 minutes.
Greedy & Intervalsintervalsmergingbinary-searchsorting - Math & Bit ManipulationMediumAuto-gradedMaximize Expected Return in Two Opaque Containers Game
Find the optimal sequence of deposit and collection moves to maximize expected value in an unobserved two-container game.
Math & Bit Manipulationprobabilityexpected-valuegreedymath