MONEY CHANGE PROBLEM

Code: https://ide.codingblocks.com/s/344291

only 2 testcase passed, rest got tle.
Can u please help.

hello @Abhi_jeet007

image

ur solution is not memory efficient , it is space complexity is O(n*N)
'try to solve this in O(N)

can u give some hint.

refer this ->article

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.