Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE ANSWER THE FOLLOWING QUESTIONS, THANK YOU 1.) Suppose an algorithm takes five seconds to handle a data set of 1,000 records. Fill in the
PLEASE ANSWER THE FOLLOWING QUESTIONS, THANK YOU
1.) Suppose an algorithm takes five seconds to handle a data set of 1,000 records. Fill in the following table, which shows the approximate growth of the execution times depending on the complexity of the algorithm.
0 (n) | 0 (n2) | 0 (n3) | 0 (n log(n)) | 0 (2t) | |
---|---|---|---|---|---|
1,000 | 5 | 5 | 5 | 5 | 5 |
2,000 | |||||
3,000 | 45 | ||||
10,000 |
For example, because 3,0002/1,0002 = 9, the algorithm would take nine times as long, or 45 seconds, to handle a data set of 3,000 records.
2.) Trace a walkthrough of:
a.) Linear search for 7 in -7 1 3 3 4 7 11 13
b.) Binary search for 8 in -7 2 2 3 4 7 8 11 13
Thank you!
Step 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