Class Hanoi
java.lang.Object
org.example.chapter1_small_problems.Hanoi
Solving The Towers of Hanoi.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Hanoi
public Hanoi(int numDiscs) Create The Towers of Hanoi.- Parameters:
numDiscs
- number of discs
-
-
Method Details
-
getTowerA
Get a stack of tower A.- Returns:
- Stack of disks of tower A
-
getTowerB
Get a stack of tower B.- Returns:
- Stack of disks of tower B
-
getTowerC
Get a stack of tower C.- Returns:
- Stack of disks of tower C
-
solve
public void solve()Solve The Towers of Hanoi.
-