Home /
Expert Answers /
Computer Science /
write-an-algorithm-fliptree-treenode-root-that-flips-a-given-input-tree-such-that-it-becomes-pa598
(Solved):
Write an algorithm, flipTree(TreeNode : root), that flips a given input tree such that it becomes ...
Write an algorithm, flipTree(TreeNode : root), that flips a given input tree such that it becomes the mirror image of the original tree. For example: You can assume, a class TreeNode with the basic methods such as getLeft(), getRight(), setLeft(), setRight(), and getValue() have been implemented and you can make use these methods to implement your solution. (10.0 marks) Starting with an empty 2-4 tree, construct a 2-4 tree with the following keys. Show the major working steps. \[ 26,24,23,25,28,27 \] (10.0 marks)