To store the frequency of each of the character of str
let cnt = new Array ( MAX ) ; for ( let i = 0 ; i < MAX ; i ++ ) { L [ i ] = new Array ( n ) ; F [ i ] = new Array ( n ) ; cnt [ i ] = 0 ; for ( let j = 0 ; j < n ; j ++ ) { L [ i ] [ j ] = 0 ; F [ i ] [ j ] = 0 ; } } for ( let i = 0 ; i < n ; i ++ ) {