bitMask [ i ] will store the count of strings from the array whose bitmask is i
var bitMask = new Array ( MAX ) . fill ( 0 ) ; for ( var i = 0 ; i < n ; i ++ ) bitMask [ getBitmask ( arr [ i ] . split ( " " ) ) ] ++ ;