sorts input based on how many steps it would take a binary search to reach that line.

....... a ....... a first
...b...   ...c... b, then c next
.d. .e.   .f. .g. d,e,f,g and so on