Skip to main content
Range Sum Query - Immutable | AlgoCracked
AlgoCracked
ProblemsRange Sum Query - Immutable
Easy60.0% acceptance
ArrayDesignPrefix Sum

Range Sum Query - Immutable

Given an integer array, answer many sumRange(left, right) queries returning the inclusive sum between two indices. Precompute so each query is O(1). NumArray(nums) constructs it. Input format Operation names + parallel argument lists.

Loading workspace…