Checking if more than one character have frequency greater than 1.
int count = 0 ; for ( int j = 0 ; j < 26 ; j ++ ) if ( freq [ j ] % 2 ) count ++ ; ( count <= 1 ) ? ( cout << " Yes " << endl ) : ( cout << " No " << endl ) ; }