What is wrong with my logic

How you have taken the consideration that b’s are not consecutive.

it was mentioned in the question that our answer doesn’t contains consecutive b’s

I mean to ask in which part of your code the consideration that b’s are not consecutive is mentioned.

i have updated my code with the comment to subtract the cases which include consecutive b’s.

How you think that these are the numbers of cases of consecutive b. I think its wrong. Actually the answer is nth fibonacci number. Now think to solve this problem.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.