Topic
Arrays & Hashing interview problems
Two pointers, prefix sums, hash maps and sliding windows. 476 original problems, each with hidden test cases you can run in the browser.
136 easy303 medium37 hard
Showing 331–360 of 476 results
Tests dictionary grouping, set operations on list suffixes, and canonical key construction for equivalence classes.
Auto-gradedhash-mapset-operationsgroupingTests discrete-time physics simulation with kinematic updates and safety constraint checking across multiple moving objects.
Auto-gradedsimulationphysicsiterationTests efficient multi-key aggregation using hash maps to group and sum records in a single pass over large datasets.
Auto-gradedhash-mapsaggregationgroupingCount non-empty index-distinct subsets where the smallest plus largest value stays within a limit, using sorting, two pointers, and modular arithmetic.
Auto-gradedtwo-pointerssortingcombinatoricsTests conditional probability over sampling without replacement, combining hypergeometric counting with Bayes' theorem to handle a "at least one" conditioning event.
Auto-gradedconditional-probabilitycombinatoricshypergeometricTests whether candidates can implement a two-phase, cross-section deduplication policy with per-section slot limits, within-section uniqueness, and optional exempt sections.
Auto-gradedhashingsimulationgreedyTests understanding of optimal stopping, geometric probability, and Poisson processes through three independent probability calculations.
Auto-gradedprobabilityoptimal-stoppingpoisson-processgeometric-probabilityTests whether a candidate can find the maximum sum of a fixed-length window over a run-length-encoded array too large to expand in memory.
Auto-gradedsliding-windowprefix-sumsrun-length-encodingbinary-searchGiven two unsorted lists of records linked by a shared booking_id, return a boolean per order indicating whether at least one matching payment exists.
Auto-gradedhash-setlookupaggregationTests ability to combine hash-counting (frequency maps) with a sliding window to find the shortest contiguous subarray satisfying a dynamic frequency-based constraint.
Auto-gradedarrayshash mapsliding windowfrequency countingTests whether a candidate can apply prefix-sum modular arithmetic to detect a length-≥2 subarray whose sum divides evenly by k in linear time.
Auto-gradedprefix-sumhash-mapmodular-arithmeticImplement the slide-and-merge move for a 2048-style grid in all four directions, sharing a single merge routine across every direction.
Model answerarrayssimulationmatrixCompute a conditional probability for drawing three cards without replacement by splitting on how many aces the first two draws contain.
Auto-gradedprobabilityconditional-probabilitycountingcombinatoricsSimulate clockwise 90° rotation on a square grid while keeping all main-diagonal and anti-diagonal elements fixed in place.
Auto-gradedmatrixsimulationrotationTests whether a candidate can extend Kadane's algorithm to a sequence formed by repeating an array k times, handling boundary crossings and all-negative inputs.
Auto-gradedkadanesubarraygreedyTests whether a candidate can reduce an O(n²) subarray search to a single linear scan by proving that adjacent pairs always dominate longer windows.
Auto-gradedarraysgreedysliding-windowTests greedy gain selection, modular triplet counting, and DP-based longest flexible non-decreasing subarray in one combined function.
Auto-gradedgreedydynamic-programmingcombinatoricsTests identifying that all-nonnegative distance terms let you reduce the search to complete diagonal overlaps, requiring quadratic iteration and overflow awareness.
Auto-gradedarraystwo-pointersmathoptimizationTests the ability to reframe a flip problem as a sliding-window search and reason about amortized complexity.
Auto-gradedsliding-windowtwo-pointersarraysTests whether a candidate can derive the valid range of R² for a joint OLS model given the individual R² values of two single-predictor models.
Auto-gradedstatisticsregressionOLSCompares classification models using business costs, derives optimal decision thresholds, and identifies the most economical model.
Auto-gradedclassificationcost-sensitive-learningconfusion-matrixmodel-evaluationTests hash table usage and algorithm optimization to locate two array positions that sum to a target value.
Auto-gradedhash-maptwo-pointersoptimizationTests ability to validate records against a lookup table, apply multi-condition filtering, and aggregate results into ranked frequency counts.
Auto-gradedsimulationhash-mapsortingTests understanding of probabilistic text classification by implementing a Multinomial Naive Bayes model from scratch and evaluating it with the F1 score.
Auto-gradednaive-bayestext-classificationf1-scoreIdentify how many values appear exactly one time in an integer array using frequency analysis.
Auto-gradedhash-tablecountingfrequency-mapTests careful list slicing and index boundary handling by replacing a contiguous subrange of one sequence with the full contents of a second sequence.
Auto-gradedarraystwo-pointersimplementationCalculate output dimensions, parameter counts, and multiply-accumulate operations for standard and depthwise separable convolutions.
Auto-gradedconvolutional-networksparameter-countingcomputational-complexityTests whether a candidate can apply the two-pointer pattern on a sorted array to collect every distinct value pair that adds up to a target, without emitting duplicates.
Auto-gradedtwo-pointerssortingdeduplicationAssemble a chronological transcript from paginated data, then reduce it to fit a token limit by removing the earliest messages.
Auto-gradedpaginationsliding-windowsimulationTests whether a candidate can transform an n×n grid in place using transpose and row-reversal, with no extra matrix allocated.
Auto-gradedmatrixin-placetwo-pointer