procedure: hanoi(n, A, B) if n - 1 then move disk from A to B else hanoi(n - 1, A, C) move disk from A to B hanoi(n - 1, C, B)