Tower of Hanoi (Recursive & Non-recursive)
Algorithm – Tower of Hanoi (recursive) TOWER(N,BEG,AUX,END)This procedure gives a recursive solution to the Towers of Hanoi problem for N disks. 1. If N = 1, then: (a) Write: BEG -> END. (b) Return. [End of If structure.] 2. [Move N – 1 disks from BEG to AUX.] […]