C++ Range Sum Query on Immutable Array via Prefix Sum December 23, 2015 algorithms, c / c++, math 2 Comments Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Given nums = sumRange(0, 2): 1 sumRange(2, 5): … [Continue Reading...]