Just for fun: Countdown numbers game solver
david.hotham at blueyonder.co.uk
david.hotham at blueyonder.co.uk
Tue Jan 29 04:02:34 EST 2008
On Jan 28, 10:11 pm, Arnaud Delobelle <arno... at googlemail.com> wrote:
> My strategy was to walk through each solution "only once" (for a
> certain definition of "only once :), thus I was hoping not to need a
> hashtable.
Yes, that seems like it should be preferable (and indeed necessary for
a more general problem with larger numbers of seeds). But I wasn't
smart enough to figure out how to do it ;-)
> Did you pick these numbers at random? Interestingly, the solution is
> unique:
Not at random - this particular puzzle came out of the first post in
this thread.
> Mine is faster on this example, but one example is not representative!
If you've found an efficient way to walk through the possible
solutions only once, then
- I expect that yours will be faster
- and well done!
I guess I should try to understand your code...
> --
> Arnaud
More information about the Python-list
mailing list