in DS
346 views
0 votes
0 votes

Let B1 is binary search tree initially  empty  then we insert the element in oder  1,2,3,4,5 .

Let B2 is another binary search tree initially empty we insert the same element in reverse order

difference between Rightmost element of B1 BST and Leftmost element of B2 BST

  1. 4
  2. 1
  3. 5
  4. 3
in DS
346 views

1 comment

A )
0
0

1 Answer

0 votes
0 votes
The Two trees will be right skewed with 5 as righmost element, and left skewed with 1 as left most element.

Therefore, 5-1=4 i.e. Option A.

Related questions