Function to update a value in the input array and segment tree . It uses updateValueUtil ( ) to update the value in segment tree
void updateValue ( int arr [ ] , int * st , int n , int i , int new_val ) {