combSort

HC Data Structure Primitives Rearrangers combSort
mergeSort combSortInPlace

combSort athing


outputs a new thing of the same type as its input, with the elements of athing in alphabetical order as its contents. The sorting algorithm combSort is used, which can be faster than mergeSort.

Example:
show CombSort [b a A 5 h _ 6 B 8 4 3 d]	;[3 4 5 6 8 _ A a b B d h]
show CombSort {b a A 5 h _ 6 B 8 4 3 d}	;{3 4 5 6 8 _ A a b B d h}
show CombSort IntArray {9 4 6 3 6 2 0}	;{0 2 3 4 6 6 9}
show CombSort Int16Array {9 4 6 3 6 2 0}	;{0 2 3 4 6 6 9}
show CombSort FloatArray {9.5 4.3 6.2 3.1 6.8 2 0}	;{0 2 3.1 4.3 6.2 6.8 9.5}

Example:

References:

mergeSort combSortInPlace