Combinatorics
Counting the ways…
Initializing Sorting Algorithms...
Sorting
Trees
Graphs
Preparing interactive visualizations...
Combinatorics
Counting the ways…
Put more pigeons than holes and two must share. Obvious — and yet it proves that something exists without ever finding it, from matching socks to people who shook the same number of hands.
Five pigeonholes. Pigeons arrive one at a time, and each is as kind as possible: it takes the emptiest hole, so collisions are put off as long as they can be.