Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/neetcode-gh/leetcode
/ NumArray
Method
NumArray
java/0307-range-sum-query-mutable.java:5–9 ·
view source on GitHub ↗
(int[] nums)
Source
from the content-addressed store, hash-verified
3
public
int
[] tree;
4
5
public
NumArray(
int
[] nums) {
6
this.n = nums.length;
7
this.tree =
new
int
[2 * this.n];
8
buildTree(nums);
9
}
10
11
// O(n)
12
private
void
buildTree(
int
[] nums) {
Callers
nothing calls this directly
Calls
1
buildTree
Method · 0.95
Tested by
no test coverage detected