Let a,b,c be arbitrary nodes in the subtrees $\alpha$, $\beta$, $\gamma$, respectively, in the left tree of Figure 13.2 (that is given below). How do the depths of a,b,c change when a left rotation is performed on node x in the figure?
Here is a snapshot of the original question.
Since in the left tree, left rotation is performed on node x and node y is above x, so subtree $\gamma$ will have not be affected by the rotation, and so depth of c remains the same.
Now, since subtree $\beta$ goes up by one level, so, depth of b decreases by 1 and since subtree $\alpha$ goes down by one level so depth of a increases by 1.
But I checked the answer online and they say:
The depth of c decreases by one, the depth of b stays the same, and the depth of a increases by 1.
The online answer is correct if I do right-rotation of the left tree at node y.
Am I misunderstanding something? Please review my answer and correct me if I am wrong.