Link to home
Start Free TrialLog in
Avatar of corey2024
corey2024

asked on

Writing a Quick sort in C++

For my AP class i need to write a quick sort with iterative?? which i don't know what it means.... i can write bubble and insertion sorts but this sort confuses me i don't know where to start.. any ideas would be very helpful.. thanx
Birdman
Avatar of Salte
Salte

Quicksort is by its very nature a recursive sort. It is not iterative. If you want a non-recursive you therefore have to make your own stack

Alf
ASKER CERTIFIED SOLUTION
Avatar of Intern
Intern

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you are allowed, you may prefer to use a linked-list class to make your list in the first place. This automatically sorts the data.
If you are not allowed to do that, then try the algorithm offered by Intern above.
This question has been abandoned. I will make a recommendation to the moderators on its resolution in a week or two. I appreciate any comments that would help me to make a recommendation.

In the absence of responses, I may recommend DELETE unless it is clear to me that it has value as a PAQ. Silence = you don't care.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Udil
EE Cleanup Volunteer