From 6df70f98ff69aa2895814d163d251ce766b62115 Mon Sep 17 00:00:00 2001 From: Bharat Agarwal Date: Sun, 8 Oct 2023 20:15:08 +0530 Subject: [PATCH] Reordering elements to end up at final pole --- book/recursion/tower-of-hanoi.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/book/recursion/tower-of-hanoi.md b/book/recursion/tower-of-hanoi.md index 65f2ae6f..34a1c5f0 100644 --- a/book/recursion/tower-of-hanoi.md +++ b/book/recursion/tower-of-hanoi.md @@ -94,16 +94,16 @@ def move_disk(from_pole, to_pole): print('moving disk from {} to {}'.format(from_pole, to_pole)) ``` -Now, calling `move_tower` with the arguments `3, 'A', 'B', 'C'` will give us the output: +Now, calling `move_tower` with the arguments `3, 'A', 'C', 'B'` will give us the output: ``` -moving disk from A to B moving disk from A to C -moving disk from B to C moving disk from A to B -moving disk from C to A moving disk from C to B -moving disk from A to B +moving disk from A to C +moving disk from B to A +moving disk from B to C +moving disk from A to C ``` Now that you have seen the code for both `move_tower` and `move_disk`, you