We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd57889 commit 2c3077aCopy full SHA for 2c3077a
Data-Structures/Tree/SegmentTree.js
@@ -41,7 +41,6 @@ class SegmentTree {
41
// tree's root node will contain all leaf node's sum
42
for (let i = size - 1; i > 0; --i) {
43
// current node's value is the sum of left child, right child
44
- // tree[i] = tree[i * 2] + tree[i * 2 + 1]
45
tree[i] = tree[i * 2] + tree[i * 2 + 1]
46
}
47
0 commit comments