Python 4 lines solution using Numpy
Numpy has its operations optimized under the hood, so although this solution did nothing special, it passed all the tests and is faster than 50% of all submissi
Numpy has its operations optimized under the hood, so although this solution did nothing special, it passed all the tests and is faster than 50% of all submissions. \n\n```\nimport numpy as np\n\nclass NumArray:\n\n    def __init__(self, nums: List[int]):\n        self.arr = np.array(nums)\n\n    def update(self, index: int, val: int) -> None:\n        self.arr[index] = val\n\n    def sumRange(self, left: int, right: int) -> int:\n        return np.sum(self.arr[left:right+1])\n```
['Python']