Function to generate all permutations and calculate the maximum sum of Bitwise AND of same indexed elements present in any permutation and an array arr [ ]
static int getMaxUtil ( List < int > p , int [ ] arr , int ans , bool [ ] chosen , int N ) {