Arrays
Ordered indexable collection for O(1) access by position.
Prefix trees for fast autocomplete, dictionary lookup, and word search.
Build a tree of letters that can store words and answer both "is this an exact word?" and "does any word start like this?".
Find the longest beginning that every word shares by walking down a trie until the path splits or a word ends.
Report the start and end position of every place a dictionary word appears inside a string, using a trie to stop dead ends early.
Find the longest word that can be built one letter at a time, where every step along the way is also a word in the list.
Swap each word in a sentence for the shortest dictionary root that starts it, found by walking the word down a trie of roots.
Store words in a trie and support searches where a dot stands for any single letter, by trying every branch at a dot.
Keep a running total on every trie node so the sum of all values whose key starts with a prefix is a single lookup.
Show up to three matching products after each letter typed, by caching the best three answers on every trie node.
Answer after every arriving letter whether the stream now ends with one of the stored words, using a trie of reversed words.
Find every word that is made by gluing together two or more shorter words from the same list, using a trie to try each split point.
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.
Key-to-value lookup in average O(1) via hashing into buckets.
Hierarchical nodes with parent–child links for ordered and nested data.