Topic
Arrays & Hashing interview problems
Two pointers, prefix sums, hash maps and sliding windows. 477 original problems, each with hidden test cases you can run in the browser.
137 easy303 medium37 hard
Showing 271–300 of 477 results
Tests piecewise-linear interpolation, binary search, and boundary handling for sampling two time series at common timestamps.
Auto-gradedinterpolationbinary-searchtime-seriesTests one-pass array scanning, integer-arithmetic collinear point detection, and union-find graph component grouping in a single combined function.
Auto-gradedarraysmathunion-findTests simulation with hash-based obstacle lookup, movement logic, and tracking a running maximum over coordinate positions.
Auto-gradedsimulationhash-setgridTests optimal single-pass tracking of minimum buy price to maximize profit from one stock transaction.
Auto-gradedarraysgreedyoptimizationsingle-passTests date arithmetic, multi-level sort stability, and designing a rule system that cleanly handles event ordering and extensibility.
Auto-gradedsortingdatessimulationBuild a multi-part order cost engine that handles input validation, per-item discounts, order-level tax, multi-currency conversion, and banker's rounding.
Model answerdata-processingdecimal-arithmeticinput-validationsortingTests per-entity state simulation where a subscription can only be renewed while still active, and any lapsed subscription is permanently void.
Auto-gradedsimulationhash-mapstate-machineTests Bayesian reasoning: computing the posterior probability of a hypothesis using likelihoods and equal priors.
Auto-gradedprobabilitybayes-theoremmathematical-reasoningTests recursive backtracking by building every permutation and every k-length subset of a list of distinct integers in a single function.
Auto-gradedbacktrackingrecursioncombinatoricsSimulate a row of cells that absorb weaker neighbors across repeated left-to-right rounds and identify the largest survivor at equilibrium.
Auto-gradedsimulationarrayslist-mutationDesign a systematic testing strategy for array and string coding problems, covering edge cases, validation, and stress testing.
Model answertestingedge-casesdebuggingMerge a sorted list into the sorted prefix of a larger list that ends with unused slots, writing in place with constant extra memory.
Auto-gradedtwo-pointersin-placesorted-arraysmergeTests sorting, sliding window, and combinatorial counting to find how many index-distinct triplets fit within a given value spread.
Auto-gradedsliding-windowsortingcombinatoricsTests grid simulation by traversing a matrix in a right-biased clockwise walk that turns at boundaries, visited cells, and blocked positions until no move is possible.
Auto-gradedmatrixsimulationgridTests stable partitioning of categorized strings and simulating gravity on independent grid columns
Auto-gradedarrayssortingsimulationtwo-pointersApply the central limit theorem and continuity correction to approximate the tail probability of a sum of independent discrete random variables.
Auto-gradedprobabilitycentral-limit-theoremnormal-approximationcontinuity-correctionTests rule-based decision logic with subset matching and outcome priority resolution when multiple rules apply simultaneously.
Auto-gradedset-operationslogicprecedenceGiven an integer array that may contain duplicates, find the minimum number of arbitrary index swaps needed to sort it in non-decreasing order.
Model answersortingpermutationscycle-detectiongreedyAggregate student scores to find the highest per-student average, then extend the solution for huge files, negative values, integer overflow, and multithreaded processing.
Model answerjavaconcurrencyaggregationinteger-overflowDetermine how many entities moving rightward on a line reach a target position when their movement is blocked by a direction-switching observer.
Model answersimulationbinary-searchprefix-sumTests whether a candidate can implement ITT, first-stage, and IV/Wald (LATE) estimators from a randomized encouragement design, including a balance check on pre-treatment activity.
Auto-gradedcausal-inferencea-b-testinginstrumental-variablesTests the ability to extract distinct elements while preserving first-occurrence order and building an index array for reconstruction.
Auto-gradedhashingdeduplicationindexingTests two-pointer simulation with alternating turns, conditional greedy selection rules, tie-breaking logic, and strict-increase constraints.
Auto-gradedsimulationtwo-pointersarraysTests understanding of causal inference mechanics by computing a DID treatment effect and flagging baseline imbalance from panel observations.
Auto-gradedcausal-inferencedata-analysisdifference-in-differencesEvaluate stored fare and per-driver policy rules over a trip table with generic field/operator conditions and exact integer-cent sums.
Auto-gradedhash-mapsortingrule-enginesimulationEvaluate a quadratic expression at every element of a sorted array and emit the results in ascending order in linear time.
Auto-gradedtwo-pointerssortingmathmonotonicFind the longest contiguous subsequence in a viewing history array where no show appears more than once (case-insensitive).
Model answersliding-windowhash-maptwo-pointersFind every possible MEX after incrementing at most one array element by 1, respecting an upper-bound constraint.
Auto-gradedarraysgreedymathcase-analysisCount how many contiguous subarrays of length exactly k have strictly increasing values in a signal array.
Auto-gradedarrayssliding-windowcountingTests whether a candidate can find the longest chain of consecutive integers in an unsorted array in linear time using a hash set.
Auto-gradedhash-setarrayssequences