The answer seems to be (n*n)/2 - 1 .
For N =5 , ans = 11 ;
But I think it should be 10; permutation 5 1 4 2 3 4 + 3 + 2 + 1 = 10
If I am wrong please explain ?
The answer seems to be (n*n)/2 - 1 .
For N =5 , ans = 11 ;
But I think it should be 10; permutation 5 1 4 2 3 4 + 3 + 2 + 1 = 10
If I am wrong please explain ?