Write a program that will perform Run Time Observation

Write a program that will perform the following tasks, in turn

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Randomly generates n integer numbers (to avoid duplicates, we want the range of thedata be much greater than the size of the data) and save them in an array data structureSort these numbers in orderRandomly generate m numbers, for each number, perform the following two searchalgorithms on the array, record the actual search time (either target is found, or not).3.1 linear search algorithm3.2 binary search algorithm

4. create a report that has the following format: (see the attached file).

CS520 Algorithm Analysis
Programming Assignment 2 – Run Time Observation
25+5 points
Write a program that will perform the following tasks, in turn
1. Randomly generates n integer numbers (to avoid duplicates, we want the range of the
data be much greater than the size of the data) and save them in an array data structure
2. Sort these numbers in order
3. Randomly generate m numbers, for each number, perform the following two search
algorithms on the array, record the actual search time (either target is found, or not).
3.1 linear search algorithm
3.2 binary search algorithm
4. create a report that has the following format:
Data size (n)
100
search entries
(m)
50
10,000
1000
1e6
1000
1e8
1000
# of found
Average time spent
linear search
Average time spent
binary search
Items to be submitted
1. source code(s)
2. a document that contains the report table
3. a readme file that simply explains how to run the code
Extra credit:
Add a space observation component in your project, so for each data size, you also report how much
memory is used.
Hint:
Refer to StopWatch.java file for managing time stamps.
Refer to http://www.javamex.com/classmexer for measuring memory usage.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER