0 0 votes We create a binary search tree $\text{B}_{1}$ by inserting the numbers $1,2,3,4,5$ into an empty binary search tree. We create another binary search tree $\text{B}_{2}$ by inserting the numbers into an empty binary search tree in the reverse order. What is the difference between the right-most element of $\text{B}_{2}$ and the left-most element of $\text{B}_{2}$? $2$ $3$ $1$ $4$ Data Structures uppcl2018 data-structures binary-search-tree + – admin 942 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
0 0 votes Rightmost Element of BST= Largest Number Left most Element of BST= Smallest Number Rightmost of BST(B1)=5 and Leftmost of BST(B2)=1 Difference=5-1 =4,So D is the correct answer. Binary Search tree(B1) with 1,2,3,4,5 & Binary Search Tree(B2) with 5,4,3,2,1 1 5 2 4 3 3 4 2 5 1 Abhisek Tiwari 4 answered May 2, 2019 Abhisek Tiwari 4 comment Share Follow 0 reply Please log in or register to add a comment.