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
courses/230/lab5
directory.
Please follow the following instructions for this lab.
1.
Copy all the files from binary-tree directory to courses/230/lab6
directory. Run all of them and make sure they work correctly.
2.
Modify ShowBinarySearchTree.java and BinarySearchTree.java to
implement your solutions for this assignment.
Write a program that implements the following

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 Programming Questions!