Suppose there are two different algorithms, ALG1 and ALG2, for solving the same
problem. The running time of ALG1 is Theta (nlogn) for any instance. The best-
case running time of ALG2 is Theta (n) and the worst-case running time of ALG2 is
Theta (n^(2)).
Which of the following is true?
The running time for ALG2 is Omega (nlogn).
ALG1 is more efficient than ALG2.
The running time for ALG1 is O(n).
ALG2 is more efficient than ALG1.
Suppose there are two different algorithms, ALG1 and ALG2, for solving the same problem. The running time of ALG1 is O(n log m) for any instance. The best- case running time of ALG2 is (n) and the worst-case running time of ALG2 is
Which of the following is true?
The running time for ALG2 is S2(m Iog m
ALG1 is more efficient than ALG2
The running time for ALG1 is O(m)
ALG2 is more efficient than ALG1