Foundations
Build your algorithmic intuition.
Arrays
A sequence gives every value an index. First decide what information a single pass can maintain.
Explore topic6 problemsStrings
Treat text as a sequence, but define what counts as a character before choosing indices.
Explore topic3 problemsHashMap
Trade a little memory for fast answers to: have I seen the value I need?
Explore topic3 problemsHashSet
Remember membership without storing a separate associated value.
Explore topic4 problemsTwo Pointers
Maintain two positions whose movement preserves a useful relationship: mirrored characters, a compacted prefix, or a sorted pair sum.
Explore topic3 problemsSliding Window
Maintain a contiguous range, reusing information as its boundaries move.
Explore topic3 problemsPrefix Sum
Store the sum of each prefix so an inclusive range can be expressed as the difference of two prefixes.
Explore topic3 problemsSorting
Reorder values by a chosen key so local comparisons reveal global structure, such as neighboring overlapping ranges.
Explore topic3 problemsBinary Search
A comparison proves that one half of the remaining candidates cannot contain the answer.
Explore topic