Arrays are the base representation for many search, window, pointer, and dynamic-programming problems.
Loading Engineering Foundry…
Loading Engineering Foundry…
Use indexed storage to reason about scans, ordering, and in-place transformations.
Arrays are the base representation for many search, window, pointer, and dynamic-programming problems.
Know when a single pass, sorting pass, or auxiliary map changes the time-space tradeoff.
These clues narrow the model. They do not replace an invariant or complexity check.
Exact active distribution: 13 easy, 17 medium, 2 hard. External records contain metadata and original guidance only.
Maintain the best prior boundary while scanning once.
Generalize prefix and suffix accumulation beyond sums.
Express the decision to extend or restart a running segment.
Practice exact count updates under a stream of additions and removals.
Process a sequence of item updates. Each update contains an item name and an integer delta. Return the item names whose final counts are positive, ordered by first appearance. Counts may reach zero but may never become negative.
Use sorted order to decide which pointer must move.
Justify why moving the shorter boundary is the only useful choice.
Shrink repeatedly after the range becomes feasible.
Relate the left prefix to the remaining total without extra arrays.
Choose one interval convention and preserve it through every update.
Identify the ordered half before deciding which half can be discarded.
Maintain a compact range while its spread stays within a limit.
Given timestamp-ordered sensor readings and a maximum allowed difference, return the length of the longest contiguous window whose highest and lowest readings differ by no more than the limit. Design for a single left-to-right pass.
Compare a bounded heap with sorting and selection algorithms.
Separate counting from selecting the highest-frequency keys.
Treat a grid as an implicit graph and mark each cell once.
Define the best result up to each position using take-or-skip.
Compare boundary maxima with a monotonic-stack interpretation.
Memoize an acyclic increasing traversal from each cell.
Makes the write-boundary invariant concrete.
Separates fixed-window bookkeeping from variable-window logic.
Tests whether counts can be updated without rebuilding each window.
Builds a subtler validity condition and follow-up reasoning.
Introduces cumulative state with minimal implementation noise.
Makes the preprocessing-versus-query trade-off explicit.
Tests in-place partition reasoning beyond calling a sort function.
Question pages let you record local completion. Account status, confidence, notes, and a topic roll-up are shown only when private account persistence is available.
Open practice workspaceLearn the reusable movement and state patterns that remove brute-force work.
Open the roadmap