Question: Please in Java Write a program to construct a general Binary Search Tree for 5000 random numbers which are between 0 and 50000. These numbers

Please in Java

Write a program to construct a general Binary Search Tree for 5000 random numbers which are between 0 and 50000. These numbers need to be generated by a random function. Also calculate the average depth of nodes.

In order to calculate the average of depth, each node has to contain the depth information when it is inserted. And if a new value you want to insert is in a current BST, it should not be inserted

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!