practice a little every day — you've got this ♡
Arrays & Hashing Interview Problems
Practice 5971 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.
- 5971
- Problems
- 2211
- Auto-graded
- 15
- Topics
- 272
- Added today
Showing 61–90 of 435 results
- Arrays & HashingEasyAuto-gradedTally Opening Click-Paths Across Shoppers
Group timestamped events by user, order them in time, and count how many distinct users share each opening action sequence of length up to k.
Arrays & Hashinghash-mapgroupingsortingprefixes - Arrays & HashingEasyAuto-gradedCollapse Round-Trip Routes into Distinct City Pairs
Normalize directed city pairs into unordered ones, remove duplicates, and return them in sorted order, testing canonicalization with hashing and sorting.
Arrays & Hashinghashingsortingdeduplicationcanonical-form - Arrays & HashingMediumAuto-gradedBusiest Network Addresses With Tie-Inclusive Top Ten Cutoff
Normalize IPv4/IPv6 strings, skip invalid ones, count occurrences, and return the top ten addresses while keeping every address tied at the tenth-place frequency.
Arrays & Hashinghash-mapcountingsortingstring-parsing - Arrays & HashingMediumAuto-gradedClockwise Grid Walk Around Obstacles and Visited Cells
Simulate a clockwise inward walk over a grid with obstacle cells, turning on edges, obstacles and visited cells, and stopping when every direction is closed.
Arrays & Hashingmatrixsimulationspiralgrid - Arrays & HashingEasyAuto-gradedDetermine Highest Single Transaction Stock Profit
Find the maximum gain possible from buying and selling a stock once, given a sequence of daily values.
Arrays & Hashingarraysgreedydynamic-programming - Arrays & HashingMediumAuto-gradedSubarrays Whose Matching-Element Count Hits a Residue
Count subarrays where the number of elements congruent to a residue, taken modulo the same base, equals that residue, using prefix remainders and a frequency table.
Arrays & Hashingprefix-sumhash-mapmodular-arithmeticsubarrays - Arrays & HashingMediumAuto-gradedMonthly Signup Cohorts: Day-30 Return Rate
Group users by first-activity month and compute the share who return exactly 30 days later, excluding users whose day 30 lies beyond the last observed date.
Arrays & Hashinghash-mapdatescohort-analysisgrouping - Arrays & HashingMediumAuto-gradedEquicorrelation Floor, Reverse Slope, and Max-Min Covariance
Combine three closed-form statistics results: the lowest shared correlation of three variables, a reverse regression slope from R² and a slope, and the covariance of the max and min of two uniforms.
Arrays & Hashingcorrelationlinear-regressionorder-statisticscovariance - Arrays & HashingEasyAuto-gradedPeak Request Load Over a Fixed Run of Minutes
Find the largest total of any k consecutive values in a list, testing fixed-size sliding window technique and the ability to avoid recomputing overlapping sums.
Arrays & Hashingsliding-windowarraysprefix-sum - Arrays & HashingMediumAuto-gradedMaximum Consecutive Ones With a Single Bit Repair
Find the longest stretch of 1s achievable in a binary list when at most one 0 may be changed to 1, using a two-pointer window that tolerates one zero.
Arrays & Hashingsliding-windowtwo-pointersbinary-array - Arrays & HashingEasyAuto-gradedFinancial Payback and Sensitivity Analysis for Renewable Energy
Perform quantitative financial modeling and sensitivity analysis for renewable energy pilot projects.
Arrays & Hashingfinancesensitivity-analysismathstatistics - Arrays & HashingMediumAuto-gradedStreak Follow-Up Chance and Two-Bot Proportion Comparison
Return the next-success probability under independence, plus a pooled two-proportion z statistic and two-sided p-value comparing two success rates.
Arrays & Hashinghypothesis-testingtwo-proportion-z-testconditional-probabilitynormal-distribution - Arrays & HashingMediumAuto-gradedGreedy First-Fit Placement of Shapes on a Grid
Simulate placing fixed binary shapes onto a grid at the first row-major position where their filled cells hit only empty cells, labelling each by its index.
Arrays & Hashingsimulationmatrixgridbrute-force - Arrays & HashingMediumAuto-gradedCount Contiguous Runs That Add Up to a Goal
Count contiguous non-empty subarrays whose elements sum to a goal value, using running prefix sums with a frequency map to handle negatives and zeros in linear time.
Arrays & Hashingprefix-sumhash-mapsubarraycounting - Arrays & HashingMediumAuto-gradedTightest Window Covering K Different Values
Find the minimum length of a contiguous block of an integer list containing at least k different values, using a sliding window with a frequency map.
Arrays & Hashingsliding-windowtwo-pointershash-map - Arrays & HashingMediumAuto-gradedTally a Ten-Frame Pin-Knocking Game from Raw Throws
Convert a flat list of throws into a ten-frame total, applying look-ahead bonuses for strikes and spares, including fill throws in the last frame.
Arrays & Hashingsimulationarraylook-aheadpointer-walk - Arrays & HashingEasyAuto-gradedOrder-Preserving Unique Values from a Mixed List
Tests using a hash-based structure to drop repeated values from a list while keeping first-occurrence order, in linear time and without modifying the input.
Arrays & Hashinghash-setordered-dictarraysdeduplication - Arrays & HashingMediumAuto-gradedRank Documents by Query Relevance with Smoothed TF-IDF
Tests hashing and counting over text: tokenize, compute smoothed IDF for query terms, score every document, and sort by descending score with an index tie-break.
Arrays & Hashinghashingtf-idftokenizationsorting - Arrays & HashingEasyAuto-gradedExecute In-Memory Key-Value Storage Commands
Simulate an in-memory key-value dictionary given a sequence of insertion, lookup, and deletion instructions.
Arrays & Hashingarrayshash-mapdata-structuresdesign - Arrays & HashingMediumAuto-gradedStream Token Lists into Fixed-Size Blocks with a Validity Mask
Concatenate truncated token lists into equal-length blocks, zero-pad the last one, and build a parallel 0/1 mask marking real tokens versus padding.
Arrays & Hashingarrayssimulationtwo-pointersbatching - Arrays & HashingMediumAuto-gradedBucket Words by Letter Multiset Without Per-Word Sorting
Cluster words that share identical letter counts into ordered buckets, using a hashable frequency key rather than sorting each word's letters, while preserving duplicates and order.
Arrays & Hashinghash-mapstringsanagramsfrequency-count - Arrays & HashingEasyAuto-gradedMonthly Hit Tracks: Overall and Per-Region Leaderboards
Filter streaming events by duration and date window, count plays per track, and produce a global top 5 and per-country top 3 with deterministic tie-breaking.
Arrays & Hashinghash-mapcountingsortinggrouping - Arrays & HashingEasyAuto-gradedKeep Only First Appearances in an Integer List
Tests using a hash set alongside a list to filter repeated integers in one pass while preserving first-appearance order, in linear time.
Arrays & Hashinghash-setarraysdeduplicationorder-preservation - Arrays & HashingMediumAuto-gradedUsers With a Qualifying Login Session in an Unordered Event Log
Pair sign-in and sign-out events per user from an unsorted log using chronological order and FIFO matching, and report users with a session within a time limit.
Arrays & Hashinghash-mapsortingqueuesimulation - Arrays & HashingMediumAuto-gradedSeeded Two-Round K-Means with Spread-Out Starting Centers
Simulate k-means++ seeding with a fixed RNG protocol, then run two assign/update rounds and report clusters, centroids and final squared error.
Arrays & Hashingsimulationclusteringrandomized-samplingfloating-point - Arrays & HashingMediumAuto-gradedLongest Run of Non-Repeating Numbers in an Array
Find the length of the longest contiguous stretch of an integer array in which no value appears twice, using a sliding window with a last-seen index map.
Arrays & Hashingsliding-windowhash-maptwo-pointerssubarray - Arrays & HashingMediumAuto-gradedMatch Cells by Four-Way Gap to Nearest Blocker
Compute, for every empty cell, the gap to the nearest blocker in each of four directions using linear sweeps, then return the cells whose four gaps equal a given target.
Arrays & Hashinggridmatrixprefix-sweepsimulation - Arrays & HashingMediumAuto-gradedAssign Persistent Table Column Identifiers
Process sequential database schema snapshots to assign permanent, case-insensitive unique column aliases with automatic collision resolution.
Arrays & Hashingarraysstringsdesign-ds - Arrays & HashingEasyAuto-gradedKeep First Record Per Login ID in Linear Time
Filter a list of record dictionaries so only the first record for each identifier remains, preserving order and doing it in a single linear pass with a hash set.
Arrays & Hashinghash-setdeduplicationarraysorder-preservation - Arrays & HashingMediumAuto-gradedFind Unique Integer Triplets Summing to Target
Finds all unique value triplets in an integer array that sum to a specified target using sorting, two-pointer scanning, and pruning.
Arrays & Hashingarraystwo-pointerssortingdeduplication