algorithms.insertionsort

Source code: algorithms/insertionsort.seq

algorithms.insertionsort.insertion_sort_array[S, T](collection: array[T], size: int, keyf: function[S, T])

Insertion Sort Sorts the array inplace.

algorithms.insertionsort.insertion_sort_inplace[S, T](collection: list[T], keyf: function[S, T])

Insertion Sort Sorts the list inplace.

algorithms.insertionsort.insertion_sort[S, T](collection: list[T], keyf: function[S, T])

Insertion Sort Returns the sorted list.