Question: Suppose there are 2n inputs to a certain problem. The running time of algorithm A is exactly 2n for exactly one of the inputs, and
Suppose there are 2n inputs to a certain problem. The running time of algorithm A is exactly 2n for exactly one of the inputs, and 1 for any other input. Then, the running time is O(1) since 2n 1 2n + 1 (1 1 2n ) 2. Is this statement correct?

4. (basic) Suppose there are 2" inputs to a certain problem. The running time of algorithm A is exactly 2 for exactly one of the inputs, and 1 for any other input. Then, the running time is 0(1) since 2 + 1 * (1-2") 2. Is this statement correct
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
