After timestamp 5:33, when input is 5 the output should be 3 and not 4. So, what change should be done in the code??
Minimum Steps-Bottom Up
getMinSteps(5) -> min(steps for 4, 2) -> 3 steps:
5 -> 4 -> 2 -> 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.