powered by
perm2cycles(perm)
perm2cycles(c(1,5,2,3,4))
Run the code above in your browser using DataLab