Fun with sorting algorithms