Floyd #1 And this: compare (1) and (2) and sort them (i.e. swap if necessary) compare (3) and (4) and sort them then compare (2) and (3) and sort them. is not Quicksort and doesn't work. Try it on a reversed list: D C B A.