Lec 36
Lec 36
[4,8) 6,9
Insert
[0,16) [0,16)
7,1 7,1
[0,8) [0,8) [8,16)
5,8 5,8 11,5
• Insert (11,5).
Properties
[0,16)
7,1
[0,8) [8,16)
5,8 11,5
• minXinRectangle(6,12,7).
• Time is O(log k).
Complexity
yok
yok yok
• maxXinRectangle(6,12,7).
• Time is O(log k).
minYinXrange(xL,xR)
[0,16)
12,1
[0,8) [8,16)
5,8 11,5
[12,16)
[0,4) 2,12 [4,8) 6,9 14,6
• minYinXrange(6,10).
• Time is O(log k).
enumerateRectangle(xL,xR,yT)
[0,16)
12,1
[0,8) [8,16)
5,8 11,5
[12,16)
[0,4) 2,12 [4,8) 6,9 14,6
• enumerateRectangle(6,12,8).
• Time is O(log k + s), where s is #points in rectangle.