Top "Towers-of-hanoi" questions

A simple puzzle involving moving discs between rods.

Hanoi Tower(Towers of Hanoi)

I'm trying to do the Towers of Hanoi problem, what I have tried so far: move(1,[H|T],B,C,…

prolog towers-of-hanoi
How does this work? Weird Towers of Hanoi Solution

I was lost on the internet when I discovered this unusual, iterative solution to the towers of Hanoi: for (int …

algorithm language-agnostic bit-manipulation towers-of-hanoi
Tower of Hanoi - n peg solution algorithm

I was implementing the tower of hanoi problem to understand more about recursion. I was able to implement it using …

c++ recursion recursive-datastructures towers-of-hanoi
Facebook sample puzzle: Towers of Hanoi

Here is a question from Facebook hiring sample test. There are K pegs. Each peg can hold discs in decreasing …

facebook algorithm recursion towers-of-hanoi