This is a classic. I like how there are some algorithms that are really elegant and seem fundamental, in a similar way to how arithmetic, basic algebra, FTA, and related seem fundamental. I think this is one. Also the LZ algorithm that iteratively builds up a dictionary of frequent patterns, and converges on the information theoretic limit.