static void update(int arr[], int arrSize, int index, int value)
{
// Your code here
arr[index-1]=value;
}
//Funciton to return the Maximum-Sum in the range.
static int query(int arr[], int n, int left, int right)
{
// code here
int curr=arr[left-1];
int sum=arr[left-1];
for (int i=left;i<right;i++){
sum=Math.max(arr[i], sum+arr[i]);
curr=Math.max(curr,sum);
}
return curr;
}