Multiple Choice
Which of the following statements about running times of algorithms is correct?
A) When determining the running time, lower-order terms must be taken into consideration.
B) When determining the running time, constants are not taken into consideration.
C) An algorithm that is O(1) means that only one comparison takes place.
D) An algorithm that is O(n) means that the number of comparisons does not grow as the size of the array increases.
Correct Answer:

Verified
Correct Answer:
Verified
Q14: What must be true about the return
Q15: In big-Oh notation, suppose an algorithm requires
Q16: Which sort algorithm starts by partitioning the
Q17: How many comparisons does selection sort make
Q18: The largestPosition method below returns the index
Q20: Which of the following statements correctly specifies
Q21: If a call to the Arrays static
Q22: Suppose objects a and b are from
Q23: In the worst case, a linear search
Q24: Consider the sort method shown below for