Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hello, I'm having so much trouble implementing those two functions (showTraversal & clear). I just keep getting errors and I'm pretty sure what I'm doing
Hello,
I'm having so much trouble implementing those two functions (showTraversal & clear). I just keep getting errors and I'm pretty sure what I'm doing is not right.
I already have the "main" ready, I just want to implement those two.
Estruct BinaryTreeNode { int key; BinaryTreeNode* left = 0; BinaryTreeNode* right = 0; //Initialized to NULL //Initialized to NULL #define BinaryTree_MAX_SIZE 100 P * Defines a binary search tree traversal data structure struct BinaryTreeTraversal { int keys (BinaryTree_MAX_SIZE]; int size = 0; void showTraversal (const BinaryTreeTraversal& traversal) { //Loop through traversal keys and print each key on the screen separated by spaces. Qvoid clear (BinaryTreeNode*& tree) { //Remove all the nodes from the 'tree' until it is emptyStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started