BIT [ i ] [ j ] : Stores frequency of ( i + ' a ' ) If j is a power of 2 , then it stores the frequency ( i + ' a ' ) of from [ 1 , j ]
let BIT = new Array ( 26 ) ; for ( let i = 0 ; i < 26 ; i ++ ) { BIT [ i ] = new Array ( 10005 ) ; for ( let j = 0 ; j < 10005 ; j ++ ) { BIT [ i ] [ j ] = 0 ; } }