Inversions[p]
counts the number of inversions in permutation p.
Details and Options
  
    
   See Also
 Tech Notes
 Related Guides
 Combinatorica`
   Combinatorica`
  Inversions
Inversions[p]
counts the number of inversions in permutation p.
Details and Options
- To use Inversions, you first need to load the Combinatorica Package using Needs["Combinatorica`"].