Coding challenge
Robert Sneidar
slylabs13 at me.com
Thu Jan 31 13:04:38 EST 2013
4 and 2 1's? Isn't the test to produce the result with the least amount of coins? This would still work. The idea is to try and fit the largest coin value into the remainder each time, until the remainder is zero.
Bob
On Jan 31, 2013, at 5:54 AM, dunbarx at aol.com wrote:
> Paul.
>
>
> As six pennies. As long as you have a "1", you should be OK.
>
>
>
>
> Craig Newman
>
>
>
>
> -----Original Message-----
> From: Paul D. DeRocco <pderocco at ix.netcom.com>
> To: 'How to use LiveCode' <use-livecode at lists.runrev.com>
> Sent: Thu, Jan 31, 2013 12:57 am
> Subject: RE: Coding challenge
>
>
>> From: Mark Wieder
>>
>>> 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.
>>
>> I'm missing something. Why would that be different?
>
> How would you represent 6?
>
> --
>
> Ciao, Paul D. DeRocco
> Paul mailto:pderocco at ix.netcom.com
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list