Re: [algogeeks] Re: Solving coin change problem with limited coins.

2014-05-16 Thread Shashwat Anand
@Don int coins [] = {1, 3, 5}; int cnt [] = {7, 3, 1}; int S = 9; Your code returns 9, for the aforementioned test case. Should not it return 3 ? Here is my take which takes O (|number of denominators| x |S| x |maximum count for any coin|) time and O (|number of denominators| x |S|) time. It is

Re: [algogeeks] Re: Solving coin change problem with limited coins.

2014-05-16 Thread Don
If you find a way to do that for more than a few coins I'd be interested in seeing it too. Don On Thursday, May 15, 2014 3:00:04 PM UTC-4, atul007 wrote: > > @Don : i am intersted in DP bottom up approach with less time complexity. > solving it recursively is a simpler approach... > On 15 May 201