OpenGenus / cosmos

World's largest Contributor driven code dataset | Used in Quark Search Engine, @OpenGenus IQ, OpenGenus Visual Project
http://internship.opengenus.org
GNU General Public License v3.0
13.53k stars 3.67k forks source link

Update coinchange.cpp #6692

Closed md-shamim-ahmad closed 1 year ago

md-shamim-ahmad commented 1 year ago

I have updated some code in this solution code and request you to merge this solution code.

Fixes issue:

If the given input amount is greater than 100 then previous solution code give us a runtime error. In my solution code, I fixed this problem.

If we look at the previous solution code then we will see that, Memory complexity of that solution is static. But in my case the memory complexity is dynamic.

Changes:

I have changed a little bit of this code so that the format of this code looking better.