ExamVeda
Login
Home
Binary Search Trees(B Tree)
?

Consider the pseudo code:
int avl(binarysearchtree root):
   if(not root)
     return 0
   left_tree_height = avl(left_of_root)
 
   if(left_tree_height== -1) 
     return left_tree_height
 
   right_tree_height= avl(right_of_root)
 
   if(right_tree_height==-1)
     return right_tree_height
Does the above code can check if a binary search tree is an AVL tree?

Answer & Solution
Correct Answer: Option A
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.