Checkpoint 31.14.1.
Implement
containsIterative for the CharBST class.
class CharBST {
private:
BSTNode* root;
public:
... functions not shown ...
};
struct BSTNode {
// Store a value and two child pointers
char value;
BSTNode* left;
BSTNode* right;
};
containsIterative for the CharBST class.
containsRecursive for the CharBST class.
insertIterative for the CharBST class.
insertRecursive for the CharBST class.
copySubTree for the CharBST class. It should create a deep copy of a subtree rooted at the given node and return a pointer to the root of the new subtree.
smallestValueFrom for the CharBST class. It should find the smallest value in a subtree rooted at the given node and return it.
removeSmallestHelper for the CharBST class. It should find and remove the smallest value in a subtree rooted at the given node and return a pointer to the root of the modified subtree.
removeHelper for the CharBST class. It should find and remove the specified value in a subtree rooted at the given node and return a pointer to the root of the modified subtree.
smallestValueFrom from CheckpointΒ 31.14.6.