[Haskell-beginners] tower hanoi problem

Mike Meyer mwm at mired.org
Sat Feb 14 21:30:11 UTC 2015


On Sat, Feb 14, 2015 at 3:27 PM, Roelof Wobben <r.wobben at home.nl> wrote:

> KC schreef op 14-2-2015 om 22:23:
>
>>
>> Hint:
>>
>> - think about what you need to do in each recursive step and in the base
>> case
>>
>> - there is also an interesting way of viewing the problem
>>
>>
>>
> Check if I can do another step or check if the end case all disk are on
> the last peg.
>
> Im very curious what the interesting way is
>

I suspect it's the iterative version that was already mentioned here. You
were close to discovering it when worked through the problem on paper.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20150214/34941891/attachment.html>


More information about the Beginners mailing list