SarthakKeshari / Java-Questions-and-Solutions

This repository aims to solve and create new problems from different spheres of coding. A path to help students to get access to solutions and discuss their doubts.
MIT License
46 stars 95 forks source link

SOLUTION-DSA[Tower of Hanoi] #397

Closed nobita851 closed 2 years ago

nobita851 commented 2 years ago

Issue Id you have worked upon -

121

Briefly explain your program logic -

Used recursive method to move n-1 disks to auxiliary rod, then nth disk to target rod and then the move n-1 disks from auxiliary rod to target rod.

Screenshots(Attach 2 screenshots of your own input and output) -

n = 3 image

n = 4 image


Checklist: