add non-recursive quick sort implementation