Checkpoint 32.14.1.
Implement
getHeight to return the height of the subtree rooted at the given node.
struct BSTNode {
// Store a value and two child pointers
char value;
BSTNode* left;
BSTNode* right;
};
getHeight to return the height of the subtree rooted at the given node.
rotateRight to perform a right rotation on the subtree rooted at the given node. It should return the new root of the rotated subtree.
rotateLeft to perform a left rotation on the subtree rooted at the given node. It should return the new root of the rotated subtree.