



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!




08-0: Dynamic Order Statistics
How can we do this with red/black trees?
08-1: Dynamic Order Statistics
08-2: Size Field
08-3: Using Size Field
08-4: Updating Size: Insert
08-5: Updating Size: Insert
08-6: Updating Size: Delete
08-7: Updating Size: Delete
08-8: Updating Size Field: Rotate
08-9: Updating Size Field: Rotate
Y
X (^) C
A B
Y
X
C
A
B
Right Rotate
Sizes of A,B,C not changed Size(Y) = Size(B) + Size(C) Size(X) = Size(A) + Size(Y)
Sizes of A,B,C not changed Size(X) = Size(A) + Size(B) Size(Y) = Size(X) + Size(C)
Left Rotate
08-10: Augmenting Data Structures
(Finding rank example) 08-11: Augmenting Data Structures
08-17: Intervals
08-18: Interval Trees
08-19: Interval Trees
0 2 10
[9,14]
[4,7] [11,12]
4 6 8 12 14 16
[3,6] [5,6]
[0,1]
[10,13] [15,17]
[14,16]
08-20: Interval Trees
08-21: Interval Trees
0 2 10
[9,14]
[4,7] [11,12]
4 6 8 12 14 16
[3,6]
17
7 17
[5,6]
6 6
[0,1]
1
[10,13] [15,17]
13 17
[14,16]
16
08-22: Interval Trees
08-23: Interval Trees
(Example updates on board) 08-24: Interval Trees
(examples in next slide) 08-25: Interval Trees