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 ____
- O(n)
- O(2^n)
- O(n^3)
- 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 :)