The OpenD Programming Language

insertionSort

Insertion sort. O(N<sup>2</sup>) time worst, average case, O(1) space, VERY * small constant, which is why it's useful for sorting small subarrays in * divide and conquer algorithms. If last argument is a ulong*, increments * the dereference of this argument by the bubble sort distance between the * input array and the sorted version of the input.

T[0]
insertionSort
(
alias compFun = "a < b"
T...
)
()

Meta