|
|
Classification Accumulation run the loops: - find cycle leader - in situ permutation short range sorting |
The FlashSort AlgorithmFlashSort sorts n elements in O(n) time. Flash-Sort uses a vector L(k) of length m in a first step for the classification of the elements of array A. Then, in a second step, the resulting counts are accumulated and the L(k) point to the class boundaries. Then the elements are sorted by in situ permutation. During the permutation, the L(k) are decremented by a unit step at each new placement of an element of class k in the array A. A crucial aspect of FlashSort is that for identifying new cycle leaders. A cycle ends, if the the vector L(k) points to the position of an element below the classboundary of class k. The new cycle leader is the element situated in the lowest position complying to the complimentary condition, i.e. for which L(k) points to a position withFinally,a small number of partially distinguishable elements are sorted locally within their classes either by recursion or by a simple conventional sort algorithm. |
Collection of demonstrations related to to the FlashSort algorithm |
|
FlashSort introduction |
To go back to FlashSort introduction click here. |
Back to Welcome |
To go back to the Welcome page click here. |
All Rights Reserved
Design by
Vladimir Marek.
Last update of the page: April 20, 2003