Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Name your source code as .cpp (replace the text with with your last name and first name, in that order) and upload to blackboard. The
Name your source code as .cpp (replace the text with with your last name and first name, in that order) and upload to blackboard. The goal of this assignment is to implement a new search function that returns a pointer to the correct node if the search term matches the data in the node, otherwise returns NULL. Also implement a print function that will go through the nodes of the tree and print them out in ascending order. You can use either a Recursive approach or a non-recursive approach. Test your code with the following actions as inputs (program these in main) create new binary tree insert "John" insert "Mary" insert "Tim" insert "Jose" insert "Alice" print out all items in the tree use your new search function to search for "Jose", if returned node is not NULL print out "Found
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