Answered step by step
Verified Expert Solution
Link Copied!

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.image text in transcribed

image text in transcribed

The following code with the balck background is what i did but it doesnt seem to work.

image text in transcribed

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 number

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

Write a Python program to check an input number is prime or not.

Answered: 1 week ago

Question

Working with other project stakeholders for support.

Answered: 1 week ago

Question

Knowledge of project management (PMI) teachings

Answered: 1 week ago