IF your intent is to sort a range of integers beginning at first and continuing to last, there are simpler ways to do it.
You don't need two loops or so many extra varaibles.
If you need to sort from both ends, shouldn't pivot be in the middle of the arrary rather than equal to array[first]?
Reputation Points: 130
Solved Threads: 75
Practically a Master Poster
Offline 618 posts
since Oct 2006