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