# Re: Making Change (#154)

**URL:** <https://www.ruby-forum.com/t/re-making-change-154/127192>\
**Category:** Ruby\
**Created:** [January 26, 2008, 12:05am UTC](https://www.ruby-forum.com/t/re-making-change-154/127192 "2008-01-26T00:05:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jameskelly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/3ab097/32.png) [@jameskelly](https://www.ruby-forum.com/u/jameskelly)\
**Post date:** [January 26, 2008, 12:05am UTC](https://www.ruby-forum.com/t/re-making-change-154/127192/1 "2008-01-26T00:05:17Z")

</div>

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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: ruby-talk ML [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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.yahoo.com/r/hs](http://www.yahoo.com/r/hs)
