I am unable to understand the approach .Can you summarize it for me?

I am unable to understand the approach .Can you summarize it for me?

hi @riagoel3999 the approach is like if you place 1 at the nth index then u can’t place 1 in n-1th index only option left is 0 which u have to keep there, so u need answer for n-2 place but u place 0 at nth index u can keep 1 at n-1 index and 0 also so u need ans for n-1 index