in Programming in C
548 views
0 votes
0 votes

Let A(n) denotes the number of n bit binary string which have no pair of consecutive 1’s. Then the time complexity of the effective algorithm which uses dynamic programming to compute A(n) will be ____

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

Here, the answer given is O(n);

I didn’t get this even after going through the solution. If any one can understand the bellow solution help me  get it , THANK YOU :)

in Programming in C
548 views

2 Comments

1
1
Thank you so much, got it :)
0
0

Please log in or register to answer this question.

Related questions