counting freq of each element
if ( mpp . ContainsKey ( digit_xor ( i ) ) ) mpp [ digit_xor ( i ) ] = mpp [ digit_xor ( i ) ] + 1 ; else mpp . Add ( digit_xor ( i ) , 1 ) ; } int maxm = 0 ; foreach ( KeyValuePair < int , int > x in mpp ) {