Description Usage Arguments Value
These algorithms sort a list or vector by a given order relation (which
defaults to <=
).
insertionSort
is a stable O(n^2) sorting algorithm that is quite efficient
for very small sets (less than around 20 elements). Use an O(n*log(n)) algorithm
for larger sets.
1 | insertionSort(xs, orderRelation = NULL)
|
xs |
The vector or list to sort. |
orderRelation |
The orderRelation to sort |
The vector or list xs
sorted by the order relation orderRelation
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.