[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: [QUIZ] Making Change (#154

James Koppel

1/25/2008 11:04:00 PM

make_change(24,[10,8,2]) #=> [8,8,8]

The above may return [10,10,2,2] on naive solutions.

----- Original Message ----
From: Dominik Honnef <dominikho@gmx.net>
To: ruby-talk ML <ruby-talk@ruby-lang.org>
Sent: Friday, January 25, 2008 2:53:34 PM
Subject: Re: [QUIZ] Making Change (#154)


On
[Sat,
26.01.2008
00:50],
Ruby
Quiz
wrote:
>
In
"Practical
Ruby
Projects,"
the
author
includes
a
couple
of
chapters
involving
>
coin
simulations.
These
simulators
are
used
to
explore
the
possibilities
of
>
replacing
a
certain
coin
or
adding
a
new
coin.

Are
there
any
advanced
combinations
of
change/array
of
coins
which
are
likely
to
fail
on
some
implementations?
--
Dominik
Honnef







____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yaho...