Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: The greedy change-making problem using regexes

by japhy (Canon)
on Mar 10, 2005 at 12:32 UTC ( #438214=note: print w/ replies, xml ) Need Help??


in reply to Re^2: The greedy change-making problem using regexes
in thread The greedy change-making problem using regexes

No, that doesn't work: it ends up using three coins (a dime and two pennies) for 12 cents, instead of two six-cent coins.

_____________________________________________________
Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart


Comment on Re^3: The greedy change-making problem using regexes
Re^4: The greedy change-making problem using regexes
by Anonymous Monk on Mar 10, 2005 at 13:14 UTC
    Which is the correct answer for the greedy algorithm. But see my posting elsewhere in this thread for a more general solution.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://438214]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2014-12-28 04:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (178 votes), past polls