Stable insertion sort for small inputs. O(n^2) but fast for small n due to low overhead.
Declared in <folly/algorithm/StableRadixSort.h>
template<
typename RandomIt,
typename Projection>
void
insertionSort(
RandomIt first,
RandomIt last,
Projection proj);
| Name | Description |
|---|---|
| first | Iterator to the first element to sort. |
| last | Iterator past the last element to sort. |
| proj | Projection returning the sort key for each element. |