Thanh Thảo
New member
What output does the below pseudo code produces?
A. right rotation of subtree
B. left rotation of subtree
C. zig-zag operation
D. zig-zig operation
Code:
Tree_node function(Tree_node x)
{
Tree_node y = x.left;
x.left = y.right;
y.right = x;
return y;
}
B. left rotation of subtree
C. zig-zag operation
D. zig-zig operation