LeetCode 303 Range Sum Query - Immutable(維護前綴和)

Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.數組 Example: spa Given nums = [-2, 0, 3, -5, 2, -1] sumRange(0, 2) -> 1 sumRange(2, 5) -> -1 sumRan
相關文章
相關標籤/搜索