Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Which of the following formulas in Big-O, best represent the expression n 2 35n +6? 0(42) O(n) O(n 2) O(n 3) Question 6 (2 points)
Which of the following formulas in Big-O, best represent the expression n 2 35n +6? 0(42) O(n) O(n 2) O(n 3) Question 6 (2 points) Which of these is used to stop the program execution when a precondition is not met. exit0: assert); void); return): Question 7 (2 points) If the precondition fails, it is a good idea to write a useful error message and then halt the program. Why would you want the program to halt? The function's memory requires have become exponential (or worse. The function's running time has become exponential (or worse). The function is no longer guaranteed to make the postcondition true. Most operating systems forbid continuation Question 8 (2 points) What will happen if a function is executed and the precondition for the function is not met? Any of the above results could happen. An error message will be printed. The system will crash. The program will loop indefinitely Question 9 (2 points) What term is used to describe an O(n) algorithm? Constant Linear Quadratic Question 10 (2 points) Express the following formula using big-O notation: n -2) (n-4) Ollog n) 0(8) O(n) None of the above
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