Count the number of strings in A [ ] which has the frequency of the smaller character less than the frequency of the smaller character of the String in B [ ]
var array = new Array ( smallestFreq . length ) . fill ( 0 ) ; var k = 0 ; for ( const val of smallestFreq ) { array [ k ] = val ; k ++ ; } var ind = lower_bound ( array , 0 , smallestFreq . length , frequency ) ;