Segment Tree | Set 2 (Range Maximum Query with Node Update)
Given an array arr[0 . . . n-1]. Find the maximum of elements from index l to r where 0 <= l <= r <= n-1. Also, change the value of a specified element of the array to a new value x. We need to do arr[i] = x where 0 <= i <= n-1 and then find the maximum element of given range with updated values.Example : Input : {1, 3, 5, 7, 9, 11}