After insertion of n keys, worst case running time of the algorithm would be _______________
An iterative algorithm to search for key k in a tree T is given below-
Assume that the tree has n nodes and height h.
search(T,k)
{
x = root(t);
while(x!=null or x!= k)
{
if(x > k) x= left[x];
else x = right[x];
}
return x;
}
Reveal answer
Fill a bubble to check yourself