Slashdot Mirror


108 Ways To Do The Towers of Hanoi

hlarwood74 writes "While it is common to program in a few different languages, somebody has written "towers of hanoi" in 108 different ways, most of them in different programming languages. It's not just the number of languages though ... there are many neat implementations and in some cases he's come up with some strange ways of solving hanoi such as this: "you ping the hanoi machine with the number of disks encoded in the type of service field, and you get response packets whose sequence numbers represent the disk moves need to solve the puzzle". I wanted to ask "why" but the title of the page (hanoimania) explains a few things :)"

8 of 192 comments (clear)

  1. Next up: 108 ways to post the same story on /. by corebreech · · Score: 5, Funny

    nt

  2. Isn't there a legend involved? by 91degrees · · Score: 5, Funny

    When someone works out every single way to solve the problem, the towers will crumble to dust and the world will vanish

  3. My addition by kinnell · · Score: 5, Funny

    Here it is coded in Whitespace:





    --
    If I seem short sighted, it is because I stand on the shoulders of midgets
    1. Re:My addition by ShootThemLater · · Score: 5, Funny

      Hmmm, looks like slashcode's added a couple of extra whitespaces in there. Won't compile.

  4. pfff ... Big deal ... by cablepokerface · · Score: 5, Funny

    Converting the Towers of Hanoi syntax into 108 different languages?

    Visual Studio.NET includes a standard wizard for that.

  5. Re:Whitespace? by FrostedWheat · · Score: 5, Funny

    Maybe they did, but you just didn't see it?

  6. yeah... by AbbyNormal · · Score: 5, Funny

    to the joy of millions of 1st year Computer Science students.

    --
    Sig it.
  7. Re:what if he had spent his time on something usef by johannesg · · Score: 4, Funny

    ...he said in a posting on slashdot.