Help Contents / Data Structure Primitives / Rearrangers / combSortInPlace

combSortInPlace anarray

command which sorts the array input anarray in alphabetical order. The sorting algorithm combSort is used,  which can be faster than mergeSort. InPlace means no new Node is generated in this command, so its faster than using the primitive combSort, but it cannot be used with lists directly. 

Example: 

	a={b a A 5 h _ 6 B 8 4 3 d} CombSortInPlace a show a	;{3 4 5 6 8 _ A a b B d h} 
	a=IntArray {9 4 6 3 6 2 0} CombSortInPlace a show a	;{0 2 3 4 6 6 9} 
	a=Int16Array {9 4 6 3 6 2 0} CombSortInPlace a show a	;{0 2 3 4 6 6 9} 
	a=FloatArray {9.5 4.3 6.2 3.1 6.8 2 0} CombSortInPlace a show a	;{0 2 3.1 4.3 6.2 6.8 9.5} 


previous: combSort	next: merge
