Question
Really need this program to have the headers with them and this is all C++. Write a function that inserts the nodes of a binary
Really need this program to have the headers with them and this is all C++.
Write a function that inserts the nodes of a binary tree into an ordered linked list. Also write a program to test your function.
Do not change anything in the supplied Ch19_Ex9.cpp except to add documentation and your name.
Please use the file names listed below since your file will have the following components: Ch19_Ex9.cpp shown below
//Data //68 43 10 56 77 82 61 82 33 56 72 66 99 88 12 6 7 21 -999
#include
using namespace std; int main() { bSearchTreeType
cout << "Enter numbers ending with -999" << endl; cin >> num;
while (num != -999) { treeRoot.insert(num); cin >> num; }
cout << endl << "Tree nodes in inorder: "; treeRoot.inorderTraversal(); cout << endl; cout << "Tree Height: " << treeRoot.treeHeight() << endl; treeRoot.createList(newList);
cout << "newList: "; newList.print(); cout << endl; system("pause");
return 0; } binarySearchTree.h binaryTree.h linkedList.h orderedLinkedList.h
Really need this program to have the headers with them and this is all C++.
Step 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