Use a much simpler (and faster) output building step.
Use a much simpler (and faster) output building step.

This implementation is much easeir to read, and is a lot clearer
about what's going on. It turns out that it's about 3 times faster
in python too!

samphippen/linear_sort