L Linh Chi New member Sep 16, 2021 #1 What is the number of moves required to solve Tower of Hanoi problem for k disks? A. 2k - 1 B. 2k + 1 C. 2$^{k}$ + 1 D. 2$^{k}$ - 1
What is the number of moves required to solve Tower of Hanoi problem for k disks? A. 2k - 1 B. 2k + 1 C. 2$^{k}$ + 1 D. 2$^{k}$ - 1
Đ Đặng Thị Thúy Hằng New member Sep 16, 2021 #2 Answer: D Explanation: Tracing of the moves in the above ToH problem will prove this result, instead you can simply add a count for each recursive call to check the number of moves. Upvote 0 Downvote
Answer: D Explanation: Tracing of the moves in the above ToH problem will prove this result, instead you can simply add a count for each recursive call to check the number of moves.