Maurice,

I just noticed that your solution can't find the path between two odd numbers.

- Mark

On 1/1/06, Maurice Codik <maurice.codik / gmail.com> wrote:
> I guess we're allowed to submit solutions now... here's my first ever ruby
> quiz solution (these quizzes are a great idea, btw):
>
> It's is an iterated-depth DFS w/ memoization written in a functional style
> for fun.
>
> It exploits the fact that the optimal path through the maze will never have
> consecutive double/halves, which reduces the avg branching factor of the
> search tree to ~2. Keeping track of this state makes the code a little
> uglier, but faster on the longer searches.
>
> Maurice