LeetCode 0303 - Range Sum Query - Immutable
Range Sum Query - Immutable
Desicription
Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.
Example:
1 | Given nums = [-2, 0, 3, -5, 2, -1] |
Note:
- You may assume that the array does not change.
- There are many calls to sumRange function.
Solution
1 | class NumArray { |