Implementing serial iterative quicksort