Ladder Problem Recursion

i am not able to understand the solution to this please explain me in easy language

Hello @jatinupadhyay786,

Refer to the following link:

They have explained it very well.
Let me know you still don’t understand something.

Give a like if you are satisfied.

jo sir ne recursion tree banaya hai usme jaab hum 0 step se 2 step jaate hai toh sir ne vaha 1 kyu likha hai vha 2 hona chaiye tha because 0 se 2 step mai jaane ke 2 method honge naa ek toh 0 to 2 direct ek 0,1,2

Hey @jatinupadhyay786,

He might have made a mistake.
It should be 2 as it also explained in the link i have shared for reference.

1 Like

bhai screenshot share karna tha kaise karu yaha?

agar mai apne tareeke se karu toh answer galat aaraha hai

Hey @jatinupadhyay786,

  1. Just take the ss and paste it here.

  2. You might be doing it wrong.

bro thread mai kaise paste karte hai option he nahi aaraha can u send me ss?

Sure @jatinupadhyay786,

Just take a screenshot with “prt sc” button on your keyboard and then paste it in the box where you type your doubt using ctrl+v.

here in the left part when we go from 0 to 2 step sir put 1 there which means there is only one way?

Hey @jatinupadhyay786,

If you see the tree carefully, sir has return 2 above the node 2 which indicates that there are two ways to reach second step.
And below that node he has explained both the routes.

  1. 0->1->2
  2. 0->2

bro he has added 1 and 1 which are the child of node 2

you are not getting my question bro?

iddhar unhone 1 likha hai jaabki 2 hona chaiye?

Hey @jatinupadhyay786,

I have understood your doubt.

Yes, he has written one which means that from 0 to 2 he can make one direct jump.
i.e. 0->2 is one of the possible path to reach 2 with a single step.

suppose in the question if it would had been given that we can jump only 1 step not 2 then jumping from 0 to 2 Step would be 0 or not?

Yes @jatinupadhyay786,

As you have yourself that there is no option to take multiple steps at once.

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.