Function to find the largest number whose frequency is equal to itself .
static int findLargestNumber ( int [ ] arr , int n ) { for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] &= 0xFFFF ; if ( arr [ i ] <= n ) {