Array to store bit - wise prefix count
let prefix_count = new Array ( bitscount ) ; for ( let i = 0 ; i < bitscount ; i ++ ) { prefix_count [ i ] = new Array ( n ) ; for ( let j = 0 ; j < n ; j ++ ) { prefix_count [ i ] [ j ] = new Array ( n ) ; for ( let k = 0 ; k < n ; k ++ ) { prefix_count [ i ] [ j ] [ k ] = 0 ; } } }