practice a little every day — you've got this ♡
Arrays & Hashing Interview Problems
Practice 5972 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.
- 5972
- Problems
- 2212
- Auto-graded
- 15
- Topics
- 273
- Added today
Showing 361–390 of 476 results
- Arrays & HashingMediumAuto-gradedSample Size Calculator for Two-Proportion Z-Test
Tests ability to implement statistical power calculations for comparing two binary outcome rates in experimental design.
Arrays & Hashingexperimentationstatisticspower-analysis - Arrays & HashingMediumAuto-gradedRotation Distance: Sum Absolute Differences Across All Shifts
Tests array rotation mechanics, computing position-wise absolute differences for every cyclic offset, and returning results in sorted order.
Arrays & Hashingarraysrotationsorting - Arrays & HashingMediumAuto-gradedContiguous Subarray Sum Count
Tests prefix sum technique with hash maps to count subarrays matching a target sum in linear time
Arrays & Hashingprefix-sumhash-mapsubarray - Arrays & HashingMediumAuto-gradedIdentify All Projects with Maximum Team Size
Group assignment pairs by project, count members per project, and return every project tied for the largest team.
Arrays & Hashingarrayshashinggroupingcounting - Arrays & HashingMediumAuto-gradedMinimum Operations to Equalize Array by Selective Increments
Tests insight that incrementing all-but-one is equivalent to decrementing one, leading to a sum-based formula instead of simulation.
Arrays & Hashingmatharraysgreedy - Arrays & HashingEasyAuto-gradedBest-of-Five: Probability All Five Games Are Played
Tests whether a candidate can derive the closed-form probability that a best-of-five series requires all five games, using combinatorial reasoning.
Arrays & Hashingprobabilitycombinatoricsmath - Arrays & HashingEasyAuto-gradedExpected Coin Flips to Observe Heads Then Tails
Tests ability to model a probabilistic process with states and solve expectation equations.
Arrays & Hashingprobabilityexpected-valuemarkov-chains - Arrays & HashingMediumAuto-gradedSample Mean: Expected Value and Variance Under Correlation
Tests ability to compute the expected value and variance of a sample mean when observations share a common correlation, plus limiting behavior in boundary cases.
Arrays & Hashingstatisticsprobabilityexpected-valuevariance - Arrays & HashingHardAuto-gradedFind All Contiguous Segments with Target Total
Tests prefix sum tracking with hash maps to efficiently count all contiguous subsequences that sum to a target value.
Arrays & Hashingprefix-sumhash-maparray - Arrays & HashingEasyAuto-gradedDaily-Deal Voucher: Restaurant Profit & Break-Even Analysis
Tests whether you can build a contribution-margin model for a voucher partnership, solve break-even and sensitivity equations, and decompose a profit change into its drivers.
Arrays & Hashingunit economicscontribution marginbreak-even analysis - Arrays & HashingEasyAuto-gradedTight Probability Bounds for the Union of Two Events
Tests whether a candidate can derive the Fréchet bounds on P(A ∪ B) given only the marginal probabilities of two events with unspecified dependence.
Arrays & Hashingprobabilityboundsinclusion-exclusion - Arrays & HashingEasyAuto-gradedMean Distinct Item Count Per Group
Tests ability to deduplicate items within groups, handle null values, and compute aggregated metrics with proper rounding.
Arrays & Hashinghash-mapsetaggregationdata-processing - Arrays & HashingMediumAuto-gradedSeven-Segment Display 180° Rotation Symmetry
Determine if a sequence of seven-segment digits appears identical when the entire display is flipped upside down.
Arrays & Hashingarrayssimulationmapping - Arrays & HashingMediumAuto-gradedGroup and Rank Users by Average Value
Tests efficient grouping and aggregation over dictionaries, plus multi-key sorting to produce ordered output.
Arrays & Hashingaggregationdictionariessorting - Arrays & HashingEasyAuto-gradedFilter and Sort Items by Embedding Similarity Score
Tests vector scoring with dot products, stable sorting with tie-breaking, and set-based filtering of excluded indices.
Arrays & Hashingarrayssortingfiltering - Arrays & HashingMediumAuto-gradedSuffix Maximum Frequency Count
Computes how many times the largest element appears in each suffix of an array using a single backward scan.
Arrays & Hashingarrayssuffix-queriessingle-pass - Arrays & HashingEasyAuto-gradedRank Nearest Neighbors by Mean Squared Error
Tests k-nearest neighbors search with distance computation, NULL handling, and top-k selection with tie-breaking.
Arrays & Hashingsimilaritydistance-metricsrankingdata-processing - Arrays & HashingMediumModel answerProportional Stratified Sampling with Largest Remainder Allocation
Sample records from grouped data while preserving stratum proportions, using the largest remainder method to allocate exact counts and seeded random selection.
Arrays & Hashingsamplinggroupinghash-tablerandomization - Arrays & HashingMediumAuto-gradedZero-Sum Triplets in an Array
Tests two-pointer technique on sorted arrays, duplicate avoidance, and quadratic complexity optimization for finding triplet combinations.
Arrays & Hashingtwo-pointerssortingarray-traversal - Arrays & HashingMediumAuto-gradedSliding Window Average over an Integer Sequence
Tests whether a candidate can compute consecutive fixed-width window averages in O(n) time by maintaining a running sum instead of recomputing each window from scratch.
Arrays & Hashingsliding-windowarraystwo-pointers - Arrays & HashingMediumAuto-gradedCollect Characters by Walking a Grid
Tests grid traversal with directional commands, run-length encoding, and boundary/obstacle validation.
Arrays & Hashingmatrixsimulationstring-building - Arrays & HashingMediumAuto-gradedReorganize Array Elements by Hash-Based Bucket Assignment
Tests understanding of parallel counting, prefix sums, and scatter operations to group array elements into contiguous buckets.
Arrays & Hashingcountingprefix-sumpartitioning - Arrays & HashingMediumAuto-gradedDifference in Proportions Confidence Interval
Tests understanding of statistical inference by computing a confidence interval for the difference between two independent proportions.
Arrays & Hashingstatisticshypothesis-testingconfidence-intervalsexperimental-design - Arrays & HashingMediumAuto-gradedRepair a Looping Script by Swapping One Instruction
Tests simulation, cycle detection, and brute-force search by finding the single jmp/nop swap that lets a small virtual machine terminate cleanly.
Arrays & Hashingsimulationcycle-detectionbrute-force - Arrays & HashingEasyAuto-gradedClassify Temperatures into Three Weather Bands
Tests careful boundary handling by bucketing integer temperatures into cold, mild, and hot ranges and returning the three counts in order.
Arrays & Hashingarrayscountingboundary conditions - Arrays & HashingMediumAuto-gradedRectangular Stamp Overlap Counter
Tests whether a candidate can use a 2D difference array to efficiently count how many rectangular regions overlap each cell of a grid.
Arrays & Hashing2d-arrayprefix-sumdifference-array - Arrays & HashingEasyAuto-gradedFind Days Available to All Participants
Tests set intersection logic and handling of multiple collections to find common elements across all inputs.
Arrays & Hashingsetsintersectionarrays - Arrays & HashingMediumAuto-gradedPuddles in a Valley: Water Volume Between Terrain Columns
Tests whether a candidate can compute trapped water volume across a height profile using the two-pointer O(1)-space technique.
Arrays & Hashingtwo-pointersprefix-maxarrays - Arrays & HashingHardAuto-gradedDistinct Value Sum Across Peak-Score Square Ring Windows
Tests 2D prefix sums, border enumeration, multi-way tie tracking, and cross-frame value deduplication on square ring-shaped windows of a matrix.
Arrays & Hashing2d-prefix-summatrixsliding-window - Arrays & HashingMediumAuto-gradedBest Single-Breakpoint Step-Function Fit
Tests whether a candidate can derive an O(n) prefix-aggregate sweep to find the one split index that minimizes total squared error for a two-segment constant model.
Arrays & Hashingarraysmathprefix-sums