RosettaCodeData/Task/Sorting-algorithms-Bead-sort/00-TASK.txt

14 lines
499 B
Plaintext

{{Sorting Algorithm}}
;Task:
Sort an array of positive integers using the [[wp:Bead_sort|Bead Sort Algorithm]].
A   ''bead sort''   is also known as a   ''gravity sort''.
Algorithm has   O(S),   where   S   is the sum of the integers in the input set:   Each bead is moved individually.
This is the case when bead sort is implemented without a mechanism to assist in finding empty spaces below the beads, such as in software implementations.
<br><br>