Create binary search tree (BST) that contains the first millionprime numbers. After you are reading in the data, output themaximum and average depth of the BST. Allow the user to enter anumber to see whether or not it is prime. If the number is found,output the depth at which it was found. If the number isn’t found,output the nearest prime number greater than and the nearest primenumber less than the user’s number.
Example output
Creating Binary Tree from 1000000 prime numbers…
The maximum depth of the tree is ?
The average depth of the tree is ?
Enter a number to see if it’s in
PayPal Gateway not configured
PayPal Gateway not configured