Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3. Suppose we have an O(n3) function that took 14s to execute with n 1000. We ran it again with a different input size, and
3. Suppose we have an O(n3) function that took 14s to execute with n 1000. We ran it again with a different input size, and the runtime was approximately 27.34s. What was the input size that second time around? 4. Given the following input sizes (n) and actual runtime (T(n)) for some function, what do you estimate is the big-oh runtime of the function? Verify your hypothesis using the technique shown in class. Additionally, verify that O(1) is an underestimate of the runtime, and show that O(n) is an overestimate of the runtime rn T (n) 2,000 2,500 5,000 7,500 0.016s 0.0249s 0.1s 0.2249s 5. Given the following input sizes (n) and actual runtime (T(n)) for some function, what do you estimate is the big-oh runtime of the function? Verify your hypothesis using the technique shown in class T (n) 1,000 2,000 10,000 25,000 0.28s 0.546s 2.728s 6.821s
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