Are you taking CLEP classes? Try clep.ai
| preferred AP College board partner for AP classes
AP Computer Science A/Unit 5: Writing Classes
Start Practice TestPractice Test
About Exam
hard

Recursive Method Time Complexity

Mark
< Prev
Next >

What is the time complexity in Big-O notation of the following recursiveExponent method?

public class ExponentialRecursion {
    public void recursiveExponent(int n) {
        if(n <= 1) return;
        recursiveExponent(n/2);
        recursiveExponent(n/2);
    }
}
A

O(log n)

B

O(n^2)

C

O(n log n)

D

O(n)

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question

Question Leaderboard

Not enough data yet to show leaderboard.

AI Tutor

How can I help?

APFIVE © 2020.
Email: apfive@apfive.org|Privacy Policy|