inversion | R Documentation |
Given a permutation and a position, swap positions i and i+1
inversion(perm, i)
perm |
a permutation |
i |
position of the permutation |
The permutation in the input with an inversion at the specified position
inversion(c(1,2,3,4,5),2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.