for each character , where character is obtained by ( i + ' a ' ) check whether it is the maximum character so far and accodingly update ' result '
for ( int i = 0 ; i < 26 ; i ++ ) if ( max < freq [ i ] ) { max = freq [ i ] ; result = ( char ) ( i + ' a ' ) ; }