practice a little every day — you've got this ♡
Coding Interview Problems
Practice 5986 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.
- 5986
- Problems
- 2219
- Auto-graded
- 15
- Topics
- 271
- Added today
Showing 1861–1890 of 2119 results
- Math & Bit ManipulationMediumAuto-gradedConvert Absolute-Value Penalty to Linear Program Constraints
Transform a portfolio optimization model with absolute-value transaction costs into standard linear programming form using auxiliary variables.
Math & Bit Manipulationlinear-programmingoptimizationmathematical-modeling - Arrays & HashingMediumAuto-gradedLongest Subarray with Bounded Variance Sum
Tests the ability to combine prefix sums with hash maps to efficiently find the longest contiguous subarray whose element-wise difference from the mean of two boundary values stays within a given tolerance.
Arrays & Hashingarraysprefix sumshash maps - Math & Bit ManipulationEasyAuto-gradedCount Animals from Legs and Population Ratios
Tests setting up and solving a system of linear equations with fixed ratios between variables.
Math & Bit Manipulationalgebralinear-equationsconstraint-satisfaction - Greedy & IntervalsEasyAuto-gradedLocate Shared Free Time Slots Across Multiple Schedules
Tests interval merging to identify time windows where all participants are simultaneously unoccupied for a minimum duration.
Greedy & Intervalsintervalsmergingscheduling - Arrays & HashingMediumAuto-gradedAdjust P-Values for Multiple Testing Corrections
Tests implementation of Bonferroni and Holm-Bonferroni procedures to control family-wise error rate when conducting multiple hypothesis tests.
Arrays & Hashingstatisticshypothesis-testingmultiple-testingalgorithms - Trees & GraphsMediumAuto-gradedCompute Minimum Distances to Multiple Destinations
Tests understanding of single-source shortest path algorithms on weighted directed graphs with positive edge weights.
Trees & Graphsshortest-pathdijkstragraph-traversalpriority-queue - Trees & GraphsMediumAuto-gradedIsland Detection and Letter Selection Counting
Tests graph traversal for connected components in a binary grid and combinatorial counting with multiset constraints.
Trees & Graphsgraph-traversalbfsconnected-componentscombinatorics - Data Structure DesignMediumAuto-gradedRing-Buffer Event Counter with Time Windows
Tests whether a candidate can implement a fixed-memory sliding-window counter using a circular array of timestamped buckets with O(1) writes and O(W) reads.
Data Structure Designsliding-windowring-bufferdata-structure-design - Trees & GraphsMediumAuto-gradedMaximum Independent Set Weight on a Tree
Tests tree DP by computing the maximum total weight of a node subset where no two chosen nodes share an edge (weighted tree independent set).
Trees & Graphstreesdynamic programminggraph traversal - Data Structure DesignMediumAuto-gradedSchema-Free Record Store with Column Indexing
Tests ability to design an in-memory key-value store with flexible schemas, column-based retrieval, and multi-field filtering logic.
Data Structure Designhash-tablesindexingdata-structures - Arrays & HashingMediumAuto-gradedCombine Two Ordered Lists
Tests the ability to implement the classic two-pointer merge algorithm in linear time.
Arrays & Hashingtwo-pointerssortingmerge-algorithm - Trees & GraphsMediumAuto-gradedCell Formula Evaluator with Cycle Detection
Build a mini spreadsheet engine that evaluates formulas, detects circular dependencies, and handles dynamic updates.
Trees & Graphsgraphsdfsrecursionmemoization - Math & Bit ManipulationMediumAuto-gradedFind Non-Overlapping String Pairs by Letter Sets
Evaluates efficient character set representation using bit manipulation and frequency-based combinatorial counting.
Math & Bit Manipulationbit-manipulationarraysstringshashing - Dynamic ProgrammingMediumAuto-gradedFind Lexicographically Smallest Expression to Match Target
Tests interval dynamic programming to build fully parenthesized expressions using all numbers in order with +, -, * operators to reach a target value.
Dynamic Programmingdynamic-programmingrecursionstrings - StringsEasyAuto-gradedCompress and Decompress a Run-Length Encoded String
Tests ability to implement both directions of run-length encoding: compressing a plain string into a compact form and expanding it back, handling edge cases carefully.
Stringsstringsencodingparsing - Greedy & IntervalsMediumAuto-gradedMaximize Tasks Completed Before Their Deadlines
Tests whether candidates can apply a greedy scheduling-with-deadlines strategy to select and order tasks that maximize the count of on-time completions.
Greedy & Intervalsgreedyintervalsscheduling - Trees & GraphsMediumAuto-gradedCount Separated Land Regions in a Binary Matrix
Tests graph traversal skills by identifying connected components in a 2D grid using BFS or DFS.
Trees & Graphsgraph-traversalbfsdfsconnected-components - Trees & GraphsMediumAuto-gradedLargest Connected Land Region
Measures understanding of graph traversal on a grid to compute connected-component sizes using four-directional adjacency.
Trees & Graphsgraphsdfsconnected-componentsgrid-traversal - Trees & GraphsMediumAuto-gradedGrid Infection Spread with Time Limit
Tests BFS-based grid simulation with simultaneous state updates, barrier cells, and handling extremely large iteration counts efficiently.
Trees & Graphsbfsgridsimulationqueue - Dynamic ProgrammingMediumAuto-gradedGrid Traversal with Sequential Waypoints
Tests dynamic programming on a grid with diagonal moves, tracking reachable states column-by-column while enforcing waypoint visitation order.
Dynamic Programminggriddpspace-optimization - StringsEasyAuto-gradedMaximum Length of Equally Frequent Character Substring
Find the longest contiguous substring where all distinct characters appear with identical frequency.
Stringssliding-windowhash-mapfrequency-counting - Trees & GraphsEasyAuto-gradedTree Height Levels: Bottom-Up Node Grouping
Compute each node's height in a rooted tree and group nodes by height, testing tree traversal and bottom-up computation.
Trees & Graphstreesbfsheightbottom-up - Linked ListsEasyAuto-gradedWeave Two Halves of a Linked List
Tests pointer manipulation intuition by reordering a singly linked list represented as an array, interleaving nodes from the front and back halves.
Linked Listslinked liststwo pointersarray manipulation - Greedy & IntervalsMediumAuto-gradedMaximum Sum Window Over Sparse Value Ranges
Find the largest sum of k consecutive positions when values are defined by disjoint intervals on an infinite line.
Greedy & Intervalssliding-windowtwo-pointersintervalsmodular-arithmetic - Trees & GraphsHardAuto-gradedCalculate Grid Infection Time
Tests breadth-first search from multiple sources to model time-based propagation in a grid with obstacles and unreachable regions.
Trees & Graphsbfsgridmulti-sourcegraph-traversal - Math & Bit ManipulationEasyAuto-gradedAverage Arc Length Containing a Fixed Point on a Circle
Tests understanding of geometric probability, the inspection paradox, and computing expectations when a random partition is observed from a fixed viewpoint.
Math & Bit Manipulationprobabilitygeometryexpectationinspection-paradox - Heaps, Sorting & SearchMediumAuto-gradedWin Rate Between Two Weighted Dice
Tests whether a candidate can count strict-win outcome pairs across two multi-faced dice efficiently using sorting and binary search instead of a brute-force double loop.
Heaps, Sorting & Searchbinary-searchsortingprobabilityarrays - Arrays & HashingMediumAuto-gradedMerge Sorted Quadratic Outputs in Linear Time
Evaluate a quadratic polynomial on a sorted array and return sorted results without using O(n log n) sorting
Arrays & Hashingtwo-pointerssortingmath - Arrays & HashingMediumAuto-gradedFind Dictionary with Extreme Field Value
Tests your ability to scan a collection of sparse dictionaries and retrieve the one with the minimum or maximum value for a specified field.
Arrays & Hashingdictionariesfilteringiteration - Math & Bit ManipulationMediumAuto-gradedPositive Divisors of N² via Prime Factorization of N
Tests whether a candidate can reduce a unit-fraction equation to a divisor-counting problem using algebraic factoring and number theory.
Math & Bit Manipulationnumber-theorydivisorsprime-factorization