Question: 1. Processes consume two resources: processing time and ____. A. bandwidth B. storage C. I/O D. Memory 2. Sequential search is also called polynomial search.
1. Processes consume two resources: processing time and ____.
A. bandwidth
B. storage
C. I/O
D. Memory
2. Sequential search is also called polynomial search.
A. True
B. False
3. In general, we worry more about average and best-case performances than about worst-case performances.
A. True
B. False
4. The first two numbers in the Fibonacci sequence are 1 and 2.
A. True
B. False
5. The average complexity of a linear search is ____.
A. O(n2)
B. O(log2n)
C. O(n)
D. O(1)
6. The difference between the results of two calls of ____ represents the elapsed time in seconds.
A. time.time()
B. ctime.time()
C. time.ctime()
D. ctime.ctime()
7. The performance of an algorithm is ____ if its work grows as a function of the square of the problem size.
A. quadratic
B. linear
C. logarithmic
D. constant
8. The time() function returns the number of seconds that have elapsed between the current time on the computers clock and January 1, ____ (also called The Epoch).
A. 1950
B. 1960
C. 1970
D. 1980
9. Selection sort is ____ in all cases.
A. O(n2)
B. O(log2n)
C. O(n)
D. O(1)
10. The performance of an algorithm is ____ if its amount of work is proportional to the log2 of the problem size.
A. quadratic
B. linear
C. logarithmic
D. constant
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
