Linked Lists
Nodes linked by pointers — insert and delete without shifting a contiguous block.
Ordered indexable collection for O(1) access by position.
Find the two numbers in an array that add up to a target value.
Remove every occurrence of a value from an array in place.
Add one to a large number represented as an array of digits.
Build the first few rows of Pascal's triangle.
Find the value that appears in more than half the array.
Find every number missing from a 1..n ranged array, in place.
Find the third distinct largest number in an array.
Pair up array values to maximize the sum of each pair’s minimum.
Check whether one array value is exactly double another.
Replace each value with the greatest value to its right.
Duplicate every zero in place, shifting later values right.
Interleave two halves of an array back into one sequence.
Build a new array where each value is looked up through itself.
Concatenate an array with itself into one longer array.
Find the customer with the most total money across accounts.
Check which kids could have the most candies after a bonus.
Check whether an array is entirely non-increasing or non-decreasing.
Count how many numbers in an array have an even digit count.
Maximize (a-1) * (b-1) over two distinct array elements.
Flip a matrix over its main diagonal.
Partition an array around a pivot value while keeping relative order.
Return every element of a matrix in spiral order.
Rotate a square matrix 90 degrees in place.
Zero out the row and column of every zero in a matrix, in place.
Advance a grid of cells one generation under Conway’s rules, in place.
Find the next greater value for each element in a circular array.
Find how many days until a warmer temperature, for each day.
Find every value that appears more than n/3 times in an array.
Find the one repeated number without modifying the array.
Check if an array can become non-decreasing by changing one element.
Find the longest cycle formed by repeatedly indexing into a permutation.
Count quadruples across four arrays whose sums add up to zero.
Reorder an array in place so it alternately rises and falls.
Find every value that appears twice in an array, in place.
Find the smallest missing positive integer in O(n) time and O(1) space.
Maximize profit across at most two non-overlapping trades.
Maximize profit across at most k non-overlapping trades.
Find the longest run of consecutive integers in an unsorted array.
Find the longest chain of envelopes that each nest inside the next.
Pick non-overlapping jobs that maximize total profit.
Find the fewest replacements needed to make an array a consecutive run.
Count subarrays whose minimum and maximum match two fixed bounds.
Hire k workers at minimum total cost while respecting wage ratios.
Nodes linked by pointers — insert and delete without shifting a contiguous block.
Last-in, first-out collection for undo, parsing, and nested work.
First-in, first-out collection for scheduling, BFS, and buffering.
Key-to-value lookup in average O(1) via hashing into buckets.
Hierarchical nodes with parent–child links for ordered and nested data.
Priority queue backed by a binary heap for fast min or max access.