Compute the frequencies of characters of all strings
for ( var i = 0 ; i < n1 ; i ++ ) { for ( var j = 0 ; j < A [ i ] . length ; j ++ ) { A_fre [ i ] [ A [ i ] . charCodeAt ( j ) - ' ' . charCodeAt ( 0 ) ] ++ ; } }