Here goes my code for the problem …
I have one doubt …
when i exchange coins into its counterpart only when possible ((n/2,n/3,n/4) using if(n/2 == 0)) i fail the cases
but if i remove the divisibility check … .it passes … which says that
for eg 15 can also be changed for its n/4 counterpart ,
why so?
Exchanging Coins cases doubt
@prabh1601
hello prabhapreet
In question they have not mentioned about divisibility maybe that’s why ur code is failing when u include divisibility condition.
well thats doesnt seems logical ryt ?
I wont be able to exchange until my cashier knows how int data type works … lol
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.
