Function to return the required count
function countMinParts ( str ) { let n = str . length ; let freq = getFrequencies ( str ) ; let oddFreq = [ ] ; let evenFreq = [ ] ; let i , sumEven = 0 ; for ( i = 0 ; i < 26 ; i ++ ) { if ( freq [ i ] == 0 ) continue ;