practice a little every day — you've got this ♡
Arrays & Hashing Interview Problems
Practice 5969 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.
- 5969
- Problems
- 2211
- Auto-graded
- 15
- Topics
- 272
- Added today
Showing 31–60 of 435 results
- Arrays & HashingEasyAuto-gradedSimulate Key-Value Operations
Process a series of insertion, update, and deletion instructions on a key-value store and return the final contents ordered by key.
Arrays & Hashingarraysstringshash-table - Arrays & HashingMediumAuto-gradedClosest Response Times: List the Tightest Increasing Pairs
Find the smallest absolute gap between any two readings, then list every strictly increasing pair achieving it, handling duplicates correctly. Tests sorting and adjacent-gap reasoning.
Arrays & Hashingsortingarraysadjacent-differenceedge-cases - Arrays & HashingMediumAuto-gradedKeep Words Whose Letter Multiset Appears More Than Once
Filter a word list to the entries whose letter multiset is shared by at least two entries, keeping input order and duplicates, using letter-count keys.
Arrays & Hashinghash-mapanagramscountingstrings - Arrays & HashingEasyAuto-gradedLeaked Allocations: Filter Blocks Missing From Live Pointers
Filter a list of allocated block addresses to those absent from a list of live pointers, keeping the original order, using hash-set membership for linear-time performance.
Arrays & Hashinghash-setfilteringorder-preservationarrays - Arrays & HashingEasyAuto-gradedEnumerate Every Settings Grid from Option Lists
Build the Cartesian product of named option lists into a list of dictionaries, handling empty inputs and a defined output order.
Arrays & Hashingcartesian-productbacktrackingitertoolsdictionaries - Arrays & HashingMediumAuto-gradedTally Orders per Customer by Status Column
Group order records by customer and count how many fall into each requested status, producing one sorted, zero-filled row per customer.
Arrays & Hashinghash-mapgroupingcountingsorting - Arrays & HashingMediumAuto-gradedRichest Window of Stalls Under Count and Distance Limits
Find the best sum over a contiguous run of position-sorted items, limited by item count and coordinate span, using sorting and a two-pointer sweep.
Arrays & Hashingsliding-windowtwo-pointerssortingprefix-sums - Arrays & HashingEasyAuto-gradedSelect Stale Replica Files for Copying
Filter a list of source file records against destination records using readability, writability, size and timestamp rules, returning names in source order.
Arrays & Hashinghash-mapfilteringsimulation - Arrays & HashingEasyAuto-gradedCount Distinct Engaged Ads Per Day from an Event Log
Tests filtering an event log by type, grouping by date, counting distinct ids with sets, and returning date-sorted results while omitting dates that have no qualifying events.
Arrays & Hashinghash-mapsetgroupingsorting - Arrays & HashingMediumAuto-gradedSliding Token on a Grid with Timed Heading Changes
Compute a token's final cell on a grid with blocked cells when its heading changes at given timestamps up to 10^9, which requires processing time segments instead of simulating each tick.
Arrays & Hashingsimulationgridintervalslarge-input - Arrays & HashingMediumAuto-gradedSliding Window Maxima on a Grid With Source Positions
Slide a square window over an integer grid with a given step, and report each window's maximum with its grid coordinates, resolving ties by the smallest row, then the smallest column.
Arrays & Hashingmatrixsliding-windowsimulationtie-breaking - Arrays & HashingEasyAuto-gradedCoupon Usage Caps: Check Remaining Redemptions per User
Count past coupon redemptions per (user, coupon) pair from a log, then answer many read-only queries on whether each user is still under the coupon's cap.
Arrays & Hashinghash-mapcountingaggregationcomposite-key - Arrays & HashingMediumAuto-gradedEarliest-Completing Pair That Hits a Target Sum
Find the pair of indices whose values sum to a target, choosing the pair that finishes earliest in the array, with deterministic duplicate handling, using a one-pass hash map.
Arrays & Hashinghash-maptwo-sumduplicatesone-pass - Arrays & HashingEasyAuto-gradedMean Household Earnings with Gaps in the Data
Compute the mean of a list of numbers while skipping None and NaN entries, returning 0.0 when nothing valid remains and rounding to two decimals.
Arrays & Hashingarraysdata-cleaningnan-handlingaggregation - Arrays & HashingMediumAuto-gradedBucket Words That Share the Same Letters
Partition a list of lowercase words into buckets of mutual rearrangements, using a canonical key and a hash map while keeping a deterministic output order.
Arrays & Hashinghash-mapstringssortinggrouping - Arrays & HashingMediumAuto-gradedEvent Log Selector with Window, Dedupe and Cap
Filter a list of event records by type, time window and id, then order them stably by timestamp and truncate, testing careful handling of optional arguments and ties.
Arrays & Hashinghashingstable-sortfilteringdedupe - Arrays & HashingMediumAuto-gradedCircular Lamps with Traveling Togglers
Find the final bits on a ring after several togglers walk clockwise for k steps, using lap decomposition, parity, and a cyclic difference array.
Arrays & Hashingdifference-arraymodular-arithmeticparitysimulation-optimization - Arrays & HashingMediumAuto-gradedTriple Challenge: Price Drops, Bounded Windows, Twin Rows
Combine a threshold binary search with greedy arithmetic sums, a linear scan counting subarrays with exact min and max, and hashing of binary rows to count identical pairs.
Arrays & Hashingbinary-searchgreedysliding-windowhashing - Arrays & HashingMediumAuto-gradedContiguous Smallest-Value Blocks in a Shuffled Sequence
Given a permutation of 1..N, decide for each k whether the values 1..k occupy a contiguous block of positions, using a running min/max position sweep.
Arrays & Hashingpermutationarrayssweepmin-max - Arrays & HashingMediumAuto-gradedEnumerate All Index Pairs Adding Up to a Goal Value
Tests hash-map indexing of duplicate values to list every index pair i < j whose values sum to a goal, in a specific sorted output order.
Arrays & Hashinghash-maptwo-sumduplicatesenumeration - Arrays & HashingMediumAuto-gradedSeven-Day Spend Grid per Shopper Using Only String Dates
Aggregate (shopper, date, amount) records into per-shopper totals for a 7-day window, using hand-written ISO date stepping and hashing instead of date libraries.
Arrays & Hashinghashingaggregationstring-datessimulation - Arrays & HashingEasyAuto-gradedCompute Usage and Quality Metrics from Workplace Search Logs
Aggregate a list of search log records into funnel, quality, latency and repeat-usage metrics, handling empty input and even-length medians.
Arrays & Hashinghash-mapaggregationsimulationmedian - Arrays & HashingEasyAuto-graded95% Z-Interval for a Mean with Known Standard Deviation
Compute a 95% z-based confidence interval for a population mean from a sample mean, known population standard deviation, and sample size, using the standard error.
Arrays & Hashingconfidence-intervalcentral-limit-theoremstandard-errora-b-testing - Arrays & HashingMediumAuto-gradedGroup Paths Whose File Contents Match Exactly
Group file paths whose contents are identical, using cheap filters like size and digest, with an exact comparison to confirm. Output is sorted groups of two or more paths.
Arrays & Hashinghashinggroupingstringssorting - Arrays & HashingEasyAuto-gradedFilter Names Absent From a Blocklist After Cleanup
Return the items of one string list whose trimmed, lowercased form is missing from a second list, keeping original spelling, order, and duplicates; tests hash sets and normalization.
Arrays & Hashinghash-setstringsnormalizationfiltering - Arrays & HashingMediumAuto-gradedLongest Run Using Only Two Flavors
Find the longest contiguous stretch of an integer array containing at most two distinct values, testing sliding window and frequency tracking.
Arrays & Hashingsliding-windowtwo-pointershash-map - Arrays & HashingEasyAuto-gradedMaximum Length of Identical Merged Arrays
Find the maximum size of two matching arrays derived by repeatedly combining adjacent elements from two positive integer sequences, or return -1 if impossible.
Arrays & Hashingarrayshash-tabletwo-pointersprefix-sum - Arrays & HashingEasyAuto-gradedBuild a Route Map Request with Markers and Striped Segments
Convert longitude-first route points into a map request with start and end markers and path groups of ten segments that alternate colors and share boundary points.
Arrays & Hashingarraysgroupingtransformationdictionaries - Arrays & HashingMediumAuto-gradedBayesian Inference for Coin Flipping
Evaluate posterior coin probabilities, posterior predictive likelihoods, and expected stopping times following observed heads.
Arrays & Hashingprobabilitybayes-theoremexpected-valuebayesian-inference - Arrays & HashingMediumAuto-gradedLongest Strictly Rising Window After One Edit
Find the longest contiguous strictly increasing window in an integer array after replacing at most one element with any integer, using prefix and suffix run lengths.
Arrays & Hashingarrayssliding-windowprefix-suffixdynamic-programming