Exchanging Coin Problem

Got a runtime error. Please check my code.

Hey @nikhil015
Use an unordered map instead because you will not be using most of the space in dp array
say we have n then we go to n/2 , n/3 and n/4 so here we will not be using space from n/2+1 to n-1 ever.
So we don’t need most of the space and n can be as large as 1 000 000 000

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.