Hacker News new | ask | show | jobs
by YetAnotherNick 1453 days ago
If the second loop is from j = i to n, it is easy to see that it will sort in decreasing order. But notice j = 1 to n, then suddenly it will sort in increasing order