Question: Write a program that implements the following operations on a Binary Search Tree. ( a ) Build a Binary Search Tree that consists of integers.
Write a program that implements the following operations on a Binary Search
Tree.
a Build a Binary Search Tree that consists of integers. Your program should read the data from an input file and then build the tree with a new node being inserted for each integer present in the input file.
b Write a method that counts numbers of nodes in this tree. Use this method to print the number of nodes in your driver module.
c Write a method that finds the largest value in this tree. Use this method to print the largest value in your driver module.
Save the implementation in
courseslab
directory.
Please follow the following instructions for this lab.
Copy all the files from binarytree directory to courseslab
directory. Run all of them and make sure they work correctly.
Modify ShowBinarySearchTree.java and BinarySearchTree.java to
implement your solutions for this assignment.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
