Python, Faster that 100% (!!), Easy solution
class NumArray(object):\n\n    def init(self, nums):\n\n        self.nums = nums\n        self.sum = sum(nums)\n\n    def update(self, index, val):\n        sel
class NumArray(object):\n\n    def __init__(self, nums):\n\n        self.nums = nums\n        self.sum = sum(nums)\n\n    def update(self, index, val):\n        self.sum += val-self.nums[index]\n        self.nums[index] = val\n        \n\n    def sumRange(self, left, right):\n        return self.sum - sum(self.nums[0:left]) - sum(self.nums[right+1:])
['Python', 'Python3']