in this video, when we are passing value of n from main function , why we are giving the initial last digit value as zero, whats the intuition of that.
Count binary strings
hi @agsa733_07f951d91d203133,
Sorry for the late reply I missed this doubt somehow…
Not only 0 he placed 1 also there.
we need to count the no of strings with no adjacent 1’s
so if n is 4 then assume there are 4 spaces _ _ _ _
now last value can be 0 or 1 right?
so the intuition is simple to try all possible value(0 and 1)
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.