Question:

The time complexity to compute the 15\(^\text{th}\) Fibonacci number using dynamic programming is _______ .

Show Hint

Dynamic programming significantly improves the time complexity of recursive problems like the Fibonacci sequence by avoiding redundant computations.
Updated On: Jun 16, 2025
  • O(1)
  • O(n)
  • O(n\log n)
  • O(\(\log n\))
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

When using dynamic programming to compute the Fibonacci number, we store intermediate results to avoid redundant calculations. This results in a linear time complexity of \(O(n)\). Using memoization or tabulation techniques, we can compute the Fibonacci number in linear time, making it much faster than the recursive approach.
Was this answer helpful?
0
0