Hoare's quicksort (recursive and non-recursive)