Question: It should be written in C++ and be pointer-based. void mirror(): Changes the BST so that the roles of the left and right pointers are

It should be written in C++ and be pointer-based.
void mirror(): Changes the BST so that the roles of the left and right pointers are swapped at every node. When you apply this function to a BST, the data value in a node will be less than the data values in its left subtree and greater than the data values in its right subtree. If you apply this function to the mirrored tree, you should obtain the original BST. mirror) mirror) 10 10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
