Driver Code
public static void main ( String [ ] args ) { int permutation [ ] = { 5 , 1 , 4 , 3 , 2 } ; int n = permutation . length ; System . out . println ( noOfTranspositions ( permutation , n ) ) ; } }