Three ways to sort a sequence