What is iterative quick sort? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson

What is iterative quick sort?

What are differences between quick sort and iterative quick sort?

7th May 2020, 3:24 PM
Yasemin - avatar
2 Answers
+ 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 - avatar
+ 1
Thank you
7th May 2020, 3:40 PM
Yasemin - avatar