Skip to content

The Tower of Hanoi is a mathematical game or puzzle. It consists of three rods and a number of disks of different diameters, which can slide onto any rod. The puzzle starts with the disks stacked on one rod in order of decreasing size, the smallest at the top, thus approximating a conical shape

Notifications You must be signed in to change notification settings

mohamed-cs/Tower-of-Hanoi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

📌 Tower-of-Hanoi, a game of 19th century

The Tower of Hanoi is a mathematical game or puzzle. It consists of three rods and a number of disks of different diameters, which can slide onto any rod. The puzzle starts with the disks stacked on one rod in order of decreasing size, the smallest at the top, thus approximating a conical shape.

Note that

Tower-of-Hanoi game is a stack application

Time complexity

Time = 2count - 1

Space complexity

Space = The largest size of stack until the function return to main program

Try this game

Tower-of-Hanoi game

About

The Tower of Hanoi is a mathematical game or puzzle. It consists of three rods and a number of disks of different diameters, which can slide onto any rod. The puzzle starts with the disks stacked on one rod in order of decreasing size, the smallest at the top, thus approximating a conical shape

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages