








Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









1
2
v.left has these intervals sorted by l i. v.right has these intervals sorted by ri.
4
5
All intervals in v overlap. Search L and R for additional overlapping intervals.
4
L R
v
l r
Intervals in v with ri >= l overlap. No interval in L overlaps. Search R for additional overlapping intervals.
4
L R
v
l r
7
8
20
10
6
2 8
15
40
30
25 35
7
18
10
4
L R
v
All intervals in v. Done!
4
L R
v
Intervals in v with large enough left end point. No interval in R overlaps. Search L for additional overlapping intervals.
Similar
11
13
If v.interval and Q overlap, done. Otherwise, if v.leftChild.max >= l search v.leftChild. Otherwise search v.rightChild.
f,
e,
a,3 c,
d,
b,
l r
max
v.leftChild.max >= l
14
A
B
B’L BR
AR
After insertion.
B
A
After rotation.
BR AR
B’L