practice a little every day — you've got this ♡
Coding Interview Problems
Practice 6013 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.
- 6013
- Problems
- 2228
- Auto-graded
- 15
- Topics
- 276
- Added today
Showing 691–720 of 2127 results
- Trees & GraphsMediumAuto-gradedEmptying a Directory Tree: Record the Deletion Order
Produce the deterministic bottom-up deletion sequence for a file tree given as flat path lists, using an iterative post-order traversal that survives very deep nesting.
Trees & Graphspost-orderdfsiterativestack - Arrays & HashingEasyAuto-gradedWeekly Trailing Mean Over a Daily Usage Series
Compute the mean of every full block of seven consecutive readings in a list, returning an empty list when fewer than seven readings exist; tests sliding-window technique.
Arrays & Hashingsliding-windowarraysprefix-sumsnumerics - Data Structure DesignMediumAuto-gradedTrack Busiest Processing Node in Rotating Allocation System
Simulate round-robin package allocation across nodes with cycle resets, capacity limits, and permanent node shutdowns.
Data Structure Designarraysdesign-dssimulation - Heaps, Sorting & SearchMediumAuto-gradedFind Array Peak Index and Form Unique Word Abbreviation List
Locate a local peak index in an array via binary search and generate minimal unambiguous string abbreviations for a list of words.
Heaps, Sorting & Searchbinary-searchstringshash-maparrays - Arrays & HashingEasyAuto-gradedOrder Each Neighboring Couple in a List, Skipping a Lone Tail
Reorder the two values inside every consecutive couple of a list so the smaller comes first, keeping couples in place and leaving an unpaired final value alone.
Arrays & Hashingarraystwo-pointerssimulationindex-handling - Arrays & HashingMediumAuto-graded2D Matrix Cross-Correlation Filter
Compute the 2D cross-correlation between a grid matrix and a filter kernel using valid padding and stride 1.
Arrays & Hashingarraysmatrix - Arrays & HashingEasyAuto-gradedBinomial Process Modeling and Moment Computation
Return theoretical properties and compute the expected value and variance for a Binomial random variable given sample size n and success probability p.
Arrays & Hashingbinomialprobabilitystatisticsmath - Data Structure DesignMediumAuto-gradedDesign an In-Memory Database Engine
Simulate an in-memory single-table key-value store supporting lookup, update, and sorted conditional selection queries.
Data Structure Designhash-mapdesignsortingstrings - Trees & GraphsMediumAuto-gradedAssemble a Reply Thread Forest from Flat Records
Convert an unordered flat list of records with parent links into a nested forest, preserving input order and rejecting duplicate ids, missing parents and cycles.
Trees & Graphstree-constructionhash-mapcycle-detectionforest - Trees & GraphsEasyAuto-gradedLabel Each Node as Root, Inner, or Leaf from Parent Links
Classify every node of a rooted tree given as [id, parent_id] pairs into Root, Inner, or Leaf, using a set of parent ids, and return the labels sorted by id.
Trees & Graphstreehash-setclassificationsorting - Math & Bit ManipulationMediumAuto-gradedCalculate Minimal Clock Hand Separation Angle
Parse 24-hour timestamp strings (including optional seconds and milliseconds) and calculate the minor angle between analog clock hands.
Math & Bit Manipulationmathstringsgeometry - StringsEasyAuto-gradedMinimum Replacements to Eliminate Consecutive Equal Triples
Find the total minimum number of character modifications required to prevent any character from repeating 3 or more times consecutively across a collection of strings.
Stringsstringsgreedy - Arrays & HashingMediumAuto-gradedMost Common Values with First-Seen Tie-Breaking
Return the k most frequent values in an integer list, ordered by count and then by first appearance, using hash counting and frequency buckets for linear time.
Arrays & Hashinghash-mapbucket-sortfrequency-counttop-k - Trees & GraphsMediumAuto-gradedReveal Cells on a Mine Grid After a Tap
Simulate one tap on a minesweeper grid, using a flood fill from zero-count cells to reveal connected safe regions and their numbered borders.
Trees & Graphsbfsflood-fillgridsimulation - Greedy & IntervalsMediumAuto-gradedFewest Conference Rooms for a Day of Bookings
Find the fewest rooms that can host every booking in an unordered list of half-open time ranges, where back-to-back bookings may share a room.
Greedy & Intervalsintervalssweep-linesortinggreedy - Data Structure DesignMediumAuto-gradedFuse Two Sensor Pipelines Into One Object History Log
Simulate a tracker that links IDs across two systems, stores observations, and returns time-ordered merged histories, testing union-find style grouping and operation replay.
Data Structure Designunion-finddesignhash-mapsorting - Data Structure DesignMediumAuto-gradedAlias Method Categorical Sampler
Generate discrete random samples according to custom category weights in constant time per sample using Vose's alias algorithm.
Data Structure Designarraysdesign-dsmath-bits - Arrays & HashingEasyAuto-gradedSquare Windows Containing Each Marked Cell
Map each marked grid cell to the sorted top-left corners of all in-bounds 2x2 windows that contain it, testing coordinate arithmetic and bounds handling.
Arrays & Hashinggridhash-mapcoordinatesenumeration - StringsEasyAuto-gradedFilter Valid Credit Card Numbers
Validate a list of card number strings against length, prefix, digit-only, and Luhn checksum requirements.
Stringsstringsarrays - Linked ListsMediumAuto-gradedClone a Linked List with Arbitrary Jump Links
Build an independent duplicate of a linked list whose nodes carry both a next link and an arbitrary jump link, using a serialized list-of-records format.
Linked Listslinked-listhash-mapdeep-copypointers - Data Structure DesignHardAuto-gradedState-Tracked Recipe Basket with Bulk Pricing
Simulate a versioned basket engine that aggregates multi-recipe component quantities for bulk discount calculations, supporting mutations and rollback operations.
Data Structure Designdesign-dsarrayshashing - Math & Bit ManipulationMediumAuto-gradedMaximum Area of a Rotated Rectangle
Find the largest surface area of any rectangle formed by four vertices chosen from a given set of 2D points.
Math & Bit Manipulationmathgeometryhashingarrays - Greedy & IntervalsMediumAuto-gradedCount Total Pipeline Output Within Time Constraint
Compute the maximum number of items processed by a sequential single-threaded worker within a total allowed time limit.
Greedy & Intervalsgreedyarraysmath - Data Structure DesignMediumAuto-gradedSharded Order Book Simulator with Cancel and Open Lookup
Simulate a sharded order book that routes users with FNV-1a, enforces a one-way status lifecycle, and answers per-user open-order queries in placement order.
Data Structure Designhash-mapsimulationstate-machinehashing - Heaps, Sorting & SearchHardAuto-gradedRanked Element Selection and Common Entry Count in Sorted Arrays
Find the k-th smallest element across two sorted arrays and count their unique shared elements efficiently.
Heaps, Sorting & Searchheaps-sortingarraysbinary-search - Data Structure DesignMediumAuto-gradedRolling Read/Write Rate Tracker for an In-Memory Dictionary Store
Simulate a key-value store that logs reads and writes with timestamps and answers per-second average rate queries over trailing windows, using compact time buckets.
Data Structure Designdesignsliding-windowdequehash-map - Data Structure DesignMediumAuto-gradedMulti-Channel Message Router with Pluggable Responders
Simulate a command-driven chat engine that dispatches messages to registered responders, keeps per-channel logs and per-responder state, and returns the resulting logs.
Data Structure Designdesignsimulationoophash-map - Data Structure DesignMediumAuto-gradedRisk-Ranked Alert Queue Simulator
Simulate a priority queue of alerts that serves the highest risk first and the oldest first on ties, driven by a list of Put and GetNext commands.
Data Structure Designpriority-queueheapdesignsimulation - Arrays & HashingEasyAuto-gradedScreening a Vendor Identity-Check Response
Validate a nested vendor response with strict type checks, then apply ordered business rules to return the first failing reason code.
Arrays & Hashingvalidationhash-maptype-checkingsimulation - Math & Bit ManipulationEasyAuto-gradedMin Comparisons to Determine Top Two Elements
Calculate the theoretical minimum number of comparisons needed in the worst case to locate both the largest and second-largest elements among N items.
Math & Bit Manipulationmathsortingalgorithms