This function uses an insertion sort to count the number of transpositions
necessary to sort the list xs.
1 | inversions(xs, decreasing = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.