Shouldnt it be no of ways?

Here for example when we compute dp[2] shouldnt it be no of ways in which 1 can be reached that is 2?

dp[i} is min steps required to reach 1 from i

in case of dp[2] it is the min steps required to reach at 1 from 2
so min step to reach 1 from 2 is 1 either by dividing with 2 or by subtracting 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.