Question: In Java, A BinarySearchTree.java is provided: 1. Implement a method Insert (T data) in BinarySearchTree.java to insert a node having value of key = data
In Java,
A BinarySearchTree.java is provided:






1. Implement a method Insert (T data) in BinarySearchTree.java to insert a node having value of key = data in a Binary Search Tree. See the algorithm presented below.

2. Implement In-Order-Traversal () in BinarySearchTree.java that prints the elements of the BST in an in-order format. If your insertion of elements in the BST is correct, then the In-Order-Traversal output should print the elements in a sorted order.

3. Write a driver program to test the BInarySearchTree.java class. Make sure you use all the methods implemented above.
public class BinaryTree
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
