Leetcode 303. Range Sum Query - Immutable
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.
Asked at:
Uber
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Late July, 2026
Uber
Mid-level
Hello Interview Premium
Your account is free and you can post anonymously if you choose.