?
Categories
Account

What is the time complexity of a recursive function that divides the problem siz

  • 📥 Instant PDF Download
  • ♾ Lifetime Access
  • 🛡 Secure & Original Content

What’s inside this PDF?

Question: What is the time complexity of a recursive function that divides the problem size by half at each step?

Options:

  1. O(n)
  2. O(log n)
  3. O(n log n)
  4. O(2^n)

Correct Answer: O(log n)

Solution:

The time complexity is O(log n) because the problem size is halved at each recursive call.

What is the time complexity of a recursive function that divides the problem siz

Practice Questions

Q1
What is the time complexity of a recursive function that divides the problem size by half at each step?
  1. O(n)
  2. O(log n)
  3. O(n log n)
  4. O(2^n)

Questions & Step-by-Step Solutions

What is the time complexity of a recursive function that divides the problem size by half at each step?
No concepts available.
Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely
Home Practice Performance eBooks