Non-Recursive quicksort

replace recursive quicksort with non-recursive version because the
recursive version cause stack overflow