Write a program that converts a binary tree into a binary search tree. I will not tell you the steps for how to do this, you will need to figure out the algorithm. However, here are some hints:
- What is the main difference between a binary search tree and a binary tree?
- What could be the middle step between a binary tree and a binary search tree?
You should start with a regular binary tree, using the code from the Binary Tree Assignment. Create a tree and then convert it to a binary search tree.
- Make your code modular!
- Respect code blocks and line spaces, naming conventions.
- Document (but do not leave comments)
- Do exactly what is asked. There will be no points for Above and Beyond this assignment.
- List your group's members in the header of the main file.