First page Back Continue Last page Summary Graphic
Analysis
Does the splaying process terminate ?
- Yes, because....
- Each splaying operation reduces the depth of the splay node
- zig-zig : depth reduced by 2
- zig-zag: depth reduced by 2
- zig: depth reduced by 1
Running time of splay(v) (v is at depth d )
- splaying a node takes: O( )
- number of splaying is: O( )
- Running time: O( )
Worst-case bound: O( )