+1 vote
in Data Structures & Algorithms I by (110k points)
In the given figure, find ‘?’.

(a) left rotation

(b) right rotation

(c) insertion

(d) deletion

The origin of the question is Binary Trees topic in section Binary Trees of Data Structures & Algorithms I

The question was posed to me during an internship interview.

1 Answer

+1 vote
by (672k points)
selected by
 
Best answer
The correct option is (b) right rotation

Easiest explanation - B is initially the right child of X. It is then rotated right side and now, B is the left child of P.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...