Mininum coin change problem


how to handle no solutin case eg. x=17 and coin denomination are 11,15,17

sorry if x=17 and coin denpmination are 11,15,19

hello @Avishek-Kumar-2445349249011561
for no solution ur dp array will contain value INT_MAX.

so here in this section compare sub with ans only when sub!=INT_MAX
image

something like

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.