Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In C++ here are the instructions and the files. The following code with the balck background is what i did but it doesnt seem to
In C++ here are the instructions and the files.
The following code with the balck background is what i did but it doesnt seem to work.
Instructions In this exercise, you will be working with Binary Search Trees to insert a large amount of numbers into a tree and then search for a specific element. Download and study the files BST.h, which contains an implementation of a Binary Search Tree along with the operations we have studied in class, and RandomSupport.h, which is just the library for generating random numbers that we have seen before Your task is to create a program that reads in a long value N from the keyboard. Then create an empty Binary Search Tree and insert N random numbers into it. You are required to use the RandomSupport.h library to generate your random numbers, and they should all be positive (greater than 0) Once the random numbers have been inserted, you need to call two functions. Assuming your Binary Search Tree is called root root insertSpecialNumber(root); and findSpecialNumber (root); The two functions above have been defined in a file called BSTUtil.h. given the file but you can assume it's in your working directory when you upload your cpp file Your program will be tested with input values on the order of millions of eleme time (less than 5 seconds) for large inputs (2 million elements) Your program must include this file in order for all this to work. You are not nts. Your program must be able to complete its work in a reasonable Sample Input Sample Output 100 Found special number. Instructions In this exercise, you will be working with Binary Search Trees to insert a large amount of numbers into a tree and then search for a specific element. Download and study the files BST.h, which contains an implementation of a Binary Search Tree along with the operations we have studied in class, and RandomSupport.h, which is just the library for generating random numbers that we have seen before Your task is to create a program that reads in a long value N from the keyboard. Then create an empty Binary Search Tree and insert N random numbers into it. You are required to use the RandomSupport.h library to generate your random numbers, and they should all be positive (greater than 0) Once the random numbers have been inserted, you need to call two functions. Assuming your Binary Search Tree is called root root insertSpecialNumber(root); and findSpecialNumber (root); The two functions above have been defined in a file called BSTUtil.h. given the file but you can assume it's in your working directory when you upload your cpp file Your program will be tested with input values on the order of millions of eleme time (less than 5 seconds) for large inputs (2 million elements) Your program must include this file in order for all this to work. You are not nts. Your program must be able to complete its work in a reasonable Sample Input Sample Output 100 Found special numberStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started