Skip to content

Commit 2cd2449

Browse files
committed
bugfix (tnx @BorysMinaiev)
1 parent 2671025 commit 2cd2449

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/english/hpc/data-structures/segment-trees.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ int sum(int lq, int rq) {
151151
return s;
152152
if (rq <= lb || lq >= rb) // if we don't intersect with the query, return zero
153153
return 0;
154-
return l->sum(k) + r->sum(k);
154+
return l->sum(lq, rq) + r->sum(lq, rq);
155155
}
156156
```
157157

0 commit comments

Comments
 (0)