0

What is iterative quick sort?

What are differences between quick sort and iterative quick sort?

7th May 2020, 3:24 PM
Yasemin
Yasemin - avatar
2 Réponses
+ 8
Quick sort is most easily done recursively. You pick a pivot point, and switch elements until everything on the left is smaller and everything on the right is bigger. Then you take both sides and apply the same algorithm again, which means the function will call itself again recursively until the list is sorted. An iterative version would try to accomplish that with loops and without recursion.
7th May 2020, 3:33 PM
HonFu
HonFu - avatar
+ 1
Thank you
7th May 2020, 3:40 PM
Yasemin
Yasemin - avatar