function that assigns value to a [ index ] and calls update function to update the tree
void updateValue ( int index , int value , int a [ ] , int n ) { a [ index ] = value ; update ( 0 , n - 1 , 0 , index , a ) ; }