On 31 Jan 2013, at 05:40, Paul D. DeRocco <pdero...@ix.netcom.com> wrote:
> Now how would you do it if the available coin values were: > > 40,30,10,4,3,1 > > That's a more interesting problem, but probably a less interesting coding > test, because I think it would involve a more brute force approach, less > elegance. Right. Not only finding the least number of coins, but also checking that the available coins can be used to create the desired total. The presence of a 1-unit coin should make that so, so long as you check the desired total is an integer. Not all solutions checked for that. Tut tut! :-) Dave _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode