Count the character having frequency greater than K and not equal to 2 K
if ( fr [ i ] > k && fr [ i ] !== 2 * k ) { c1 ++ ; ch = String . fromCharCode ( i + " " . charCodeAt ( 0 ) ) ; } if ( fr [ i ] === 2 * k ) { c2 ++ ; ch1 = String . fromCharCode ( i + " " . charCodeAt ( 0 ) ) ; } } for ( i = 0 ; i < n ; i ++ ) ans . push ( " " ) ; var mp = { } ; if ( c % 2 === 0 c1 > 0 c2 > 0 ) { for ( i = 0 ; i < n ; i ++ ) {