Sort an array using only one local variable | Hacker News Reader