Question: Suppose T is an initially empty search tree and we insert the sequence of n keys 1 , 2 , 3 , . . .
Suppose T
is an initially empty search tree and we insert the sequence of n
keys n
in increasing order, into T
Then the height of the resulting search tree T
is
Question Answer
a
Theta logn
if T
is a Splay tree, but is Theta n
if T
is a BST
b
Theta logn
regardless of whether T
is a Splay tree or an AVL tree
c
Theta n
regardless of whether T
is a BST or a Splay tree or an AVL tree
d
Theta n
if T
is a Splay tree, but is Theta logn
if T
is an AVL tree
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
