retagged by
956 views
3 votes
3 votes

 

retagged by

1 Answer

0 votes
0 votes
For 0 bits(empty letter) : 1 possibility

For 1 bit : 0, 1 : 2 possibilities

For 2 bits : 00, 01, 10 : 3 possibilities

For 3 bits : 000, 001, 010, 100, 101 : 5 possibilities

For 4 bits : 8 possibilities

So to generalise, T(n) = T(n-1) + T(n-2) which accounts for O(2^n).

Related questions

1 votes
1 votes
1 answer
1
1 votes
1 votes
0 answers
2
1 votes
1 votes
1 answer
3
Prince Sindhiya asked Oct 23, 2018
630 views
Is there Any short cut to do these questions fast ?
0 votes
0 votes
1 answer
4
Overflow04 asked Oct 9, 2022
414 views
how O($n^{2}$) in the last.(in the given solution).