Or, when a $1 denomination is used, all values can be represented. In this case, the solution is undefined, so you can return anything you like (or even loop forever).Why is the solution undefined if a $1 denomination is used? I'd say there's an obvious answer: 0.
In reply to Re: Golf: Buying with exact change
by Anonymous Monk
in thread Golf: Buying with exact change
by blokhead
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |