This is done in C++ data structures class. DO NOT USE ANY HEADER FILES EXCEPT <I
ID: 3759668 • Letter: T
Question
This is done in C++ data structures class. DO NOT USE ANY HEADER FILES EXCEPT <IOSTREAM>.
Already made stuff in .h file. use the given "struct" and pointer "head"
struct BinaryTreeNode {
int data;
BinaryTreeNode* left_child;
BinaryTreeNode* right_child;
};
BinaryTreeNode* head; // This is in a class
// The Remove method for the BinaryTree class. This is by far the hardest to
// implement. Removing from a binary search tree is a little tricky. See the
// link above to understand why. This function returns false if the value isn't
// anywhere in the tree, and true if the value was removed. You'll need to use
// the "delete" operator so you don't leak memory in this one.
bool BinaryTree::Remove(int value) { return false; }
// Create any helper functions to make this easier please
Explanation / Answer
struct BinaryTreeNode {
int data;
BinaryTreeNode* left_child;
BinaryTreeNode* right_child;
};
BinaryTreeNode* head;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.