Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
assignments
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
datovky
assignments
Commits
3e8ac681
Commit
3e8ac681
authored
6 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
Range tree: polished task description
parent
ed70b773
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
12-range_tree/task.md
+6
-6
6 additions, 6 deletions
12-range_tree/task.md
with
6 additions
and
6 deletions
12-range_tree/task.md
+
6
−
6
View file @
3e8ac681
You are given an implementation of a
s
play tree which associates every numeric
key with a numeric value. The
s
play tree provides
`lookup`
,
`insert`
, and
`remove`
You are given an implementation of a
S
play tree which associates every numeric
key with a numeric value. The
S
play tree provides
`lookup`
,
`insert`
, and
`remove`
operations.
Your goal is to modify the
s
play tree to support range queries in amortized
logarithmic time. The operation you need to implement takes a
n
range o
n
the
input
and should return the sum of values of the elements in the given range.
Your goal is to modify the
S
play tree to support range queries in amortized
logarithmic time. The operation you need to implement takes a range o
f
the
keys
and
it
should return the sum of values of the elements in the given range.
As usual, you should submit only the
`range_tree.{h,py}`
file.
## Optional: Range updates (for 5 points)
## Optional: Range updates (for
extra
5 points)
If you also implement an operation
```
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment