Question: Write a JAVA code that implements a Binary Search Tree. The program must include the following methods: 1. void PrintInOrder(); --> Prints the list in

Write a JAVA code that implements a Binary Search Tree.

The program must include the following methods:

1. void PrintInOrder(); --> Prints the list in order, or Left, Current, Right 2. void PrintPostOrder(); --> Prints the list in post order, or Current, Right, Left 3. void PrintPreOrder(); --> Prints the list in pre-order, or Current, Left, Right 4. void PrintRevOrder(); --> Prints the list in reverse order, or Right, Current, Left 5. void AddNode(); --> Inserts the node at the proper location in the tree 6. Node SearchTree(int key); --> Searches for a key in the tree. 7. Node FindMin(); --> Finds the smallest value in the tree. 8. Node FindMax(); --> Finds the largest value in the tree

* Do not use Scanner or Bufferreader; let the user initiatize array values within the Main.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!