Arrays
Ordered indexable collection for O(1) access by position.
Key-to-value lookup in average O(1) via hashing into buckets.
Decide whether two words use exactly the same letters by counting the letters of one in a hash map and spending them on the other.
Answer whether any value repeats in an array by keeping every value seen so far in a hash set and stopping at the first repeat.
Check whether one string can be built from the letters of another by counting the available letters in a hash map and spending them.
Find the index of the first character that never repeats, using one pass to count every character and a second pass to find it.
Group words that are rearrangements of each other by filing every word in a hash map under the sorted letters that form its signature.
Check a sudoku board for repeated digits in any row, column or 3 by 3 box by storing one combined key per rule in a hash set.
Build a hash map from scratch with put, get and remove, using a fixed set of buckets and a list in each bucket to handle collisions.
Count ordered triples of points where two of them sit the same distance from the third, by tallying squared distances per anchor point.
Find the most points sharing one straight line by tallying reduced direction keys in a hash map for every point taken as the anchor.
Support insert, remove and a fair random pick in constant time by pairing an array of values with a hash map from each value to its position.
Ordered indexable collection for O(1) access by position.
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.
Hierarchical nodes with parent–child links for ordered and nested data.
Priority queue backed by a binary heap for fast min or max access.