Function to return the minimum possible value of | K - X | where X is the bitwise AND of the elements of some sub - array
static int closetAND ( int [ ] arr , int n , int k ) { int ans = int . MaxValue ;