Updates a node in Binary Index Tree ( BITree ) at given index in BITree . The given value ' val ' is added to BITree [ i ] and all of its ancestors in tree .
def updateBIT ( BITree , n , index , val ) : NEW_LINE