Programming Thread

Viewing single post

Started by the-pi-guy, Mar 13, 2016, 10:39 PM

previous topic - next topic

the-pi-guy

That's scheduling, not compsci



Anyways, I have to write lessons for all the sorting algorithms in textbooks.  I'm arbitrarily starting with quicksort.  Does it "have" to be recursive?  I can't find a non-recursive algorithm and I'd rather not write one.
No. Nonrecursive
Optimized QuickSort -- C Implementation (Non-Recursive)



Usually it's possible to change an implementation from recursive to iterative.