Flattr this

Tower of Hanoi with 30 slices - Move 0 / 1073741823

Next move: Slice #1 from left stack to middle stack.
This is the 1st move for this slice.

This program is using a non-iterative (non-recursive) solution for
the Towers of Hanoi problem. Click here to view the sourcecode.
Click here to skip 1 000 000 moves.
Non-iterative means in that case that it does not iterate over the moves to calculate the state of the system. That means the program can calculate the full state of the game for every move number in constant time. But since the task of the program is to calculate the position of each slice it does still iterate over the slices. That means the cost for calculating a state of a game with n slices is O(n).  
Copyright (C) 2005 Clifford Wolf <clifford@clifford.at>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.