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