What output does the below pseudo code produces?
Posted: Wed Jul 13, 2022 7:42 pm
advertisement
var adpushup = window.adpushup || {};
adpushup.que = adpushup.que || [];
adpushup.que.push(function () {
if (adpushup.config.platform === "MOBILE") {
adpushup.triggerAd("90f55663-effd-4105-b1e7-29d86b526544");
} else if ((window.outerWidth <= 768) || (window.outerWidth == 0)) {
adpushup.triggerAd("90f55663-effd-4105-b1e7-29d86b526544");
}
});
Tree_node function(Tree_node x)
{
Tree_node y = x.left;
x.left = y.right;
y.right = x;
return y;
}
a) right rotation of subtree
b) left rotation of subtree
c) zig-zag operation
d) zig-zig operation
var adpushup = window.adpushup || {};
adpushup.que = adpushup.que || [];
adpushup.que.push(function () {
if (adpushup.config.platform === "MOBILE") {
adpushup.triggerAd("90f55663-effd-4105-b1e7-29d86b526544");
} else if ((window.outerWidth <= 768) || (window.outerWidth == 0)) {
adpushup.triggerAd("90f55663-effd-4105-b1e7-29d86b526544");
}
});
Tree_node function(Tree_node x)
{
Tree_node y = x.left;
x.left = y.right;
y.right = x;
return y;
}
a) right rotation of subtree
b) left rotation of subtree
c) zig-zag operation
d) zig-zig operation