filmov
tv
TOWER OF HANOI | CSES PROBLEMSET SOLUTION | PROBLEM 14
Показать описание
The Tower of Hanoi game consists of three stacks (left, middle and right) and n round disks of different sizes. Initially, the left stack has all the disks, in increasing order of size from top to bottom.
The goal is to move all the disks to the right stack using the middle stack. On each move you can move the uppermost disk from a stack to another stack. In addition, it is not allowed to place a larger disk on a smaller disk.
Your task is to find a solution that minimizes the number of moves.
__________________________________________________________________
Chapters:
0:00 Introduction
1:28 Examples
6:42 Number of steps
7:08 Recursive function
11:12 Tracing the function
15:49 Program
__________________________________________________________________
Problem Link:
__________________________________________________________________
Solution Link:
__________________________________________________________________
C++ STL series:
__________________________________________________________________
Watch other videos posted on Code Disk channel :
_________________________________________________________________
The goal is to move all the disks to the right stack using the middle stack. On each move you can move the uppermost disk from a stack to another stack. In addition, it is not allowed to place a larger disk on a smaller disk.
Your task is to find a solution that minimizes the number of moves.
__________________________________________________________________
Chapters:
0:00 Introduction
1:28 Examples
6:42 Number of steps
7:08 Recursive function
11:12 Tracing the function
15:49 Program
__________________________________________________________________
Problem Link:
__________________________________________________________________
Solution Link:
__________________________________________________________________
C++ STL series:
__________________________________________________________________
Watch other videos posted on Code Disk channel :
_________________________________________________________________