# LeetCode303 Range Sum Query-Immutable

## 描述

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

Note:

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

## 思路

$\mathcal{O}(n)$预处理出前缀和，然后$\mathcal{O}(1)$查询即可。