RubyFlow The Ruby and Rails community linklog

Using Ruby To Solve Towers Of Hanoi Iteratively And Recursively

We can demonstrates the value of recursion by using Ruby to solve the Towers of Hanoi puzzle both iteratively and recursively. As a side-effect this shows how much more expressive the solution can be when done in Ruby.

Comments

This was pretty useful. I am learning Ruby and just to explore things, i was trying to implement various problems in Ruby.Will also try to implement Tower of Hanoi… may be with some another approach… I generally put my code on my blog at http://rubydubee.blogspot.com thanks

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in