Available question text
Given an immutable integer array, implement a NumArray that returns the sum of elements in any [left, right] range. Because the array is static and queries may be numerous, precompute prefix sums so each query can be answered in O(1) time.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Uber
Leetcode 303. Range Sum Query - Immutable
Reported Jul 27, 2026 · 1 source report
MID_LEVEL
Source snapshot: Nov 12, 2026
View source