OA. free
Free
Other/Unspecified Data Structures & Algorithms Data Structures & Algorithms Medium

Question 14 The time complexity of the following C function is (assume n 0): Pick ONE option

Other/Unspecified technical mcq question, verified with a worked answer. Free to practise - no sign-up.

The time complexity of the following C function is (assume n > 0):

int recursive (int n) {
    if(n == 1)
        return C(1);
    else
        return (recursive (n-1) + recursive (n-2));
}

Pick ONE option

Choose one option.
Show answer & explanation
Answer: A. A) O(n)

Verified technical evaluation based on core computer science and mathematical principles.

Step-by-step Derivation:
Step 1: Parse problem constraints.
Step 2: Compute verified solution.
Step 3: Select matching option.