Shouldnt the minimum steps be 3 instead of 4 in case of 5 as shown in your program. [5 cannot be divided by 3 or 2 so 5-1 is step one, and from 4 it takes 2 steps{ 4/2-> 1 step, 2/2 ->1 step}
Regarding Result of 5
one step is taken for going from 5 to 4 so we have considered that as well. Please mark your doubt as resolved if you are satisfied
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.