Ch-4-Prob-New-권의회

1899 days ago by matrix

Permutation([2,3,1,4,7,6,5]).inversions() 
       
[[0, 2], [1, 2], [4, 5], [4, 6], [5, 6]]
[[0, 2], [1, 2], [4, 5], [4, 6], [5, 6]]
Permutation([2,3,1,4,7,6,5]).number_of_inversions() 
       
5
5
Permutation([2,3,1,4,7,6,5]).is_even() 
       
False
False