On Jan 27, 9:47 pm, "Eric I." <rubytrain... / gmail.com> wrote: > I made a slight modification to Paolo's solution, so it avoids > searching coin combinations that are permutations of others (i.e., > [25, 1] and [1, 25]). It does this by only allowing the system to add > coins at or beyond the last coin used in the combination being built. > So, if the coins are [25, 10, 5, 1], and we're building from 25, 10, > 10, 5 then the next coin be only a 5 or a 1. It seems to speed > Paolo's solution by about 30% on my system. Cool, thanks! (By the way, the other solution was 6 times slower than breadth-first, not 3. The difference arose because I ran one with battery power and the other with wall power). Paolo