Re: Making Change (#154)

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

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

----- Original Message ----
From: Dominik H. [email protected]
To: ruby-talk ML [email protected]
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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs