find the minimum frequency of every character in str1
for ( $ i = 0 ; $ i < $ l2 ; $ i ++ ) $ count = min ( $ count , $ freq [ ord ( $ str2 [ $ i ] ) - ord ( ' a ' ) ] / $ freq2 [ ord ( $ str2 [ $ i ] ) - ord ( ' a ' ) ] ) ; return $ count ; }