Commit b831b103 authored by Martin Mareš's avatar Martin Mareš

Range tree: Fixed a comment

parent 3e8ac681
......@@ -148,7 +148,7 @@ class Tree {
}
}
// Return number of elements in range [left, right].
// Return the sum of elements with keys in range [left, right].
//
// Given a closed range [left, right], return the sum of values of elements
// in the range, i.e., sum(value | (key, value) in tree, left <= key <= right).
......
......@@ -121,7 +121,7 @@ class Tree:
right.parent = self.root
def range_sum(self, left, right):
"""Return number of elements in range [left, right]
"""Return the sum of elements with keys in range [left, right]
Given a closed range [left, right], return the sum of values of elements
in the range, i.e., sum(value | (key, value) in tree, left <= key <= right).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment