On 08 Dec 2014, at 7:36 , Sven Van Caekenberghe <sven@stfx.eu> wrote:Hi,
Here is another article I just published
LampSort, a non-recursive QuickSort implementation
The divide and conquer partitioning is at the heart of QuickSort
https://medium.com/@svenvc/lampsort-a-non-recursive-quicksort-implementation-4d4891b217bd
Pharo makes it easy to implement this non-recursive version of QuickSort - and beautiful as well.
Sven
partition: interval
| pivot index |
pivot := data at: interval first.
data swap: interval first with: interval last.
index := interval first.