Topic
Arrays & Hashing interview problems
Two pointers, prefix sums, hash maps and sliding windows. 475 original problems, each with hidden test cases you can run in the browser.
135 easy303 medium37 hard
Showing 451–475 of 475 results
Tests your ability to merge two pre-sorted arrays into a single sorted result using the classic two-pointer technique.
Auto-gradedtwo-pointerssortingmergeIdentifies whether a target value occurs at even/odd indices and in the first/second half of an even-length array in one pass.
Auto-gradedarray-traversalboolean-flagsearly-terminationTests ability to use difference arrays to efficiently apply multiple range-update operations and decode the final state.
Auto-gradedarraysdifference arrayprefix sumshashingApply the capture-recapture estimator to infer total population size from overlapping detection counts.
Auto-gradedstatisticsestimationprobabilityTests grouping, deduplication, and timestamp arithmetic over semi-structured event records.
Auto-gradedgroupingaggregationtimestampsdata-wranglingCalculate how many chess queens can attack each query position, first without obstacles, then accounting for blocking pieces on the board.
Model answergeometryhash-mapbinary-searchsortingApply the Law of Total Probability and Bayes' Theorem to compute ride request likelihoods and conditional weather probabilities.
Auto-gradedprobabilitybayes-theoremconditional-probabilityTests efficient computation of two simple aggregate statistics using optimal data structures and complexity analysis.
Auto-gradedhash-mapscountingcomplexity-analysisTests ability to check constraint satisfaction across multiple overlapping groups using efficient duplicate detection.
Auto-gradedhash-setconstraint-checkingmatrixCompute the exact cumulative probability P(X ≥ k) for a binomial random variable, testing understanding of numerical stability in probability calculations.
Auto-gradedprobabilitybinomial-distributionnumerical-methodsTests whether a candidate can combine Bayesian posterior updating with expected-value analysis to make a statistically grounded product launch decision.
Auto-gradedbayesian-inferencedecision-analysisab-testingTests Kadane's algorithm with tie-breaking, frequency-based minimum selection, and counterclockwise skip-step grid simulation in one combined function.
Auto-gradedarraysdynamic-programmingsimulationTests whether a candidate can identify and reverse length-biased sampling to recover true household-level proportions from child-level survey data.
Auto-gradedprobabilitysampling-biasweighted-estimationConstruct a valid work schedule assigning human reviewers to tasks under minimum-coverage and no-repeat constraints, then extend it to stay balanced in every prefix.
Model answerconstructiveschedulingcombinatoricsCalculate the probability that one person's coffee selections outperform another's under different definitions of "better"
Auto-gradedprobabilitycombinatoricssymmetryTests ability to handle encoded card ranks, Ace-as-low/high semantics, ambiguous endpoints, and missing-element logic in a fixed consecutive sequence.
Auto-gradedarraysstringsenumerationTests the ability to use hash counting (frequency maps) to efficiently locate the first character in a string that appears exactly once.
Auto-gradedarrays & hashinghash countingstringsTests whether a candidate can use hash counting to find the pair of distinct characters whose absolute frequency difference is largest in a given string.
Auto-gradedarrays & hashinghash countingstringsTests the ability to apply a sliding window to find the longest contiguous subarray whose element sum does not exceed a given limit.
Auto-gradedarrayssliding windowprefix sumsTests ability to use hash counting with a sliding window to find the shortest contiguous subarray that contains at least k complete pairs of each bracket type.
Auto-gradedarrayshash mapsliding windowtwo pointersTests in-place partitioning using a hash map to precompute element frequencies, then a two-pointer scheme to rearrange elements without extra array allocation.
Auto-gradedarrayshash mapstwo pointersin-place partitioningTests in-place partitioning by rearranging an integer array so all even-indexed positions hold even numbers and all odd-indexed positions hold odd numbers, without allocating a new array.
Auto-gradedarraystwo pointersin-place partitioningTests the classic sliding window pattern for finding the longest contiguous subarray containing at most K distinct values.
Auto-gradedarrayssliding windowhash mapTests the difference-array technique by efficiently applying ranged inventory updates and then scanning totals to answer threshold queries.
Auto-gradedarraysdifference arrayprefix sumshashingTests ability to use prefix sums to efficiently answer multiple range-sum queries on a fixed array.
Auto-gradedarraysprefix sumshashing