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 .
void updateBIT ( int BITree [ ] , int n , int index , int val ) {