Examveda

Consider the below left-left rotation pseudo code where the node contains value pointers to left, right child nodes and a height value and Height() function returns height value stored at a particular node.
 avltree leftrotation(avltreenode z):
   avltreenode w =x-left
   x-left=w-right
   w-right=x
   x-height=max(Height(x-left),Height(x-right))+1 
   w-height=max(missing)+1   
  return w
What is missing?

A. Height(w-left), x-height

B. Height(w-right), x-height

C. Height(w-left), x

D. Height(w-left)

Answer: Option A


This Question Belongs to Data Structure >> Binary Search Trees(B Tree)

Join The Discussion

Related Questions on Binary Search Trees(B Tree)