Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ This program is going to be a hashing program. You will be using an integer array for the values. You are going to use

c++ This program is going to be a hashing program. You will be using an integer array for the values. You are going to use modulo-division to store the values in an array. Your array size will be125 (about 25% larger than number of values to store), but you will use the value 101 for your division (prime number). Your collision resolution will be linear probe with a value of 3. In your program, you will generate 100 random values in the range of 2300 to 2600. You will use modulo division to determine where in the array to store a value. If a value already exists at the location (how do you know if it exists? This is something you will need to figure out how to do.), you will use collision resolution to determine where to store the value. After you have stored all of the values, then you will generate 5 random numbers between the range of 2300 to 2600 and search for them in the array. Print out the indexes where you search for the number. Indicate whether the number is found or not. Your output should be written to results.txt. In this file, you will first print out the random numbers that you generated. Then you will write out the entire array with the index and the number that is stored in that location. This does not have to be implemented in a class. There is no user input. Example of results.txt Numbers generated 2323 2424 2327 2329 Array 0 2323 1 2 3 2424 4 2327 5 6 2329 7 Example of output to screen: Searching for 2424 Searched location 0 Searched location 3 Found at location 3

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 Security XI Status And Prospects

Authors: T.Y. Lin, Shelly Qian

1st Edition

0412820900, 978-0412820908

More Books

Students also viewed these Databases questions

Question

Explain Industrial market segment.

Answered: 1 week ago

Question

Explain the market segmentation.

Answered: 1 week ago

Question

1. Select the job or jobs to be analyzed.

Answered: 1 week ago