Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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 empty

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David Kroenke

11th Edition

0132302675, 9780132302678

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago