Function to find the number of str2 that can be formed using characters of str1
function findNumberOfTimes ( str1 , str2 ) { let freq = new Array ( 26 ) ; let freq2 = new Array ( 26 ) ; for ( let i = 0 ; i < 26 ; i ++ ) { freq [ i ] = 0 ; freq2 [ i ] = 0 ; } let l1 = str1 . length ;