Given an integer array nums, build a structure supporting two operations:
update(index, val)- replacenums[index]withval.sumRange(left, right)- return the sum ofnums[left..right]inclusive.
To keep the harness simple, you implement a single function processOperations(nums, operations) where each operation is either ["update", index, val] or ["sum", left, right]. Return an array containing the result of each "sum" operation in order ("update" operations contribute nothing to the output).
Both update and sumRange must run in better than O(n) per call - the intended complexity is O(log n) each.