updating the bit array of a valid block
def update ( idx , blk , val , bit ) : NEW_LINE INDENT while idx < MAX : NEW_LINE INDENT bit [ blk ] [ idx ] += val NEW_LINE idx += ( idx & - idx ) NEW_LINE DEDENT DEDENT