Solution Of Tower Of Hanoi Problem Using Recursion | FREE DSA Course in JAVA | Lecture 45

Solution Of Tower Of Hanoi Problem Using Recursion | FREE DSA Course in JAVA | Lecture 45

41.618 Lượt nghe
Solution Of Tower Of Hanoi Problem Using Recursion | FREE DSA Course in JAVA | Lecture 45
Solving tower of Hanoi problem | tower of Hanoi problem recursive solution | solution of tower of Hanoi problem in java | program to solve tower of Hanoi problem | Java program to solve tower of Hanoi problem In this lecture, we are going to solve a very interesting question known as tower of Hanoi problem. Let's first see what is a tower of Hanoi is problem? So tower of Hanoi is a game where we get three towers say A,B,C and we have 3 discs arranged in the tower A in such a way the largest disc is at the lowest position and smallest disc is at the top. Now the problem is that you have to arrange these disc in the same manner in the tower C in such a manner that it satisfy the following conditions:- 1. Only one disc can be moved at a time 2. A larger disc cannot be placed on a small disc So what's the solution? Here are a simple steps to do so in 7 steps as follows. A to C, A to B, C to B, A to C, B to A, B to C, A to C. Now the challenge is, we have to solve this problem using a java program. Now during the course of the lecture you will find that you can break this problem into three sub problems and which are actually our recurrence relationship. So let's start the lecture, understand the logic behind solving this problem and the program in java to solve the tower of Hanoi problem. Subscribe to our channel for regular updates on the dsa course and click on the bell icon to never miss an update from our dsa course. Data Structures and Algorithms Free Course (Learn DSA Without Paise) Playlist - https://youtube.com/playlist?list=PLU83Ru7iGtAvP1rqt65MCDSBPFCzUKGXG For more information, fill this form: https://forms.gle/8eiUmM92Fx563Aen9 or call us at 8884881203 Facebook: https://www.facebook.com/thetapacademy Instagram:https://www.instagram.com/tapacademy_online Linkedin: https://www.linkedin.com/company/73820805 Website: https://www.thetapacademy.com​ #dsa #dsacourse #java #dsainjava #javaprogramming #coding #coder #recursion #placement