powered by
Given a permutation and two positions i, j, move item in position i to position j
insert(perm, i, j)
The permutation in the input in which th eoperation has been applied
a permutation
position of the permutation
insert(c(1,2,3,4,5),5,2) insert(c(1,2,3,4,5),2,5)
Run the code above in your browser using DataLab