Skip to content

Commit

Permalink
fix: update code
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-jerry-ye committed Nov 28, 2024
1 parent c66a7ee commit 17d91c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion next/sources/segment-tree/src/part2/top.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ fn modify(
self.apply(tag)
} else {
guard let Node(left~, right~, ..) = self
left.apply(tag) + right.apply(tag)
let mid = (l + r) >> 1
left.modify(l, mid, modify_l, modify_r, tag) +
right.modify(mid + 1, r, modify_l, modify_r, tag)
}
}
// end modify definition
Expand Down

0 comments on commit 17d91c2

Please sign in to comment.