Have a question about a Quiz 1 answer...
In problem 7.2, it asks, "Under the assumption that logBase2 is O(n), what is the order (use big Oh notation) of f(n)?"
The answer says that it is still O(n), but it seems like it should be O(nlogn), as f(n) has a loop which executes as many times as the logBase2(n) value. Therefore, the call to logBase2(n) will be O(n), and the loop is O(log(n)), so shouldn't the entire function be O(nlogn)?

Hey! We 've verified this expert answer for you, click below to unlock the details :)

I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!

show

Looking for something else?

Not the answer you are looking for? Search for more explanations.