Question: Please use C++ for the following: Part A. Write a function called find_successor to find the successor of a random node in a BST. 1.
Please use C++ for the following:
Part A. Write a function called find_successor to find the successor of a random node in a BST.
1. Request the user to enter random numbers.
2. Insert them into a binary search tree (BST).
3. Print your BST.
4. Ask the user to pick a random node.
5. Call your find_successor function to find the successor of the node.
6. Print the answer.
Part B. Write a function called tree_walk to sort the numbers in your BST and print them.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
