Range Sum Query – Immutable

Title: Range Sum Query – Immutable Source: leetcode.com

Given an integer array nums, find the sum of the elements between indices i and j (ij), inclusive.

Example:


Note:

  1. You may assume that the array does not change.
  2. There are many calls to sumRange function.


Python solution

Rate this post

Leave a Reply