Tower Of Hanoi | Simple Story | Story To Code | Recursion Concepts And Questions | Video 7
iPad PDF Notes - https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/iPad%20PDF%20Notes/Recursion%20Concepts%20%26%20Qns%20-%207.pdf
Whatsapp Community Link : https://www.whatsapp.com/channel/0029Va6kVSjICVfiVdsHgi1A
This is the 7th video of our playlist "Recursion Concepts And Questions". Find the Details below :
Video Name : Tower Of Hanoi | Simple Story | Story To Code | Recursion Concepts And Questions
Video # : 7
C++/Java Code Link : https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/Recursion/Tower%20of%20Hanoi.cpp
GfG Problem Link : https://practice.geeksforgeeks.org/problems/tower-of-hanoi/0
π Unraveling Recursion: A Journey into the Depths of Code
π₯ Welcome to the 6th Video of my Recursion Playlist! π In this enlightening video, we will solve a very famous recursion problem "Tower Of Hanoi" with the help of Recursion. We will start with a Simple story understanding with Tower Of Hanoi Diagram and then we will be Converting Story to code and writing the recursive code for Tower Of Hanoi and also I will also be explaining the Time and Space Complexity of the code π
π What's Inside?
π Simple story understanding with Tower Of Hanoi Diagram
π Converting Story to code and writing the recursive code for Tower Of Hanoi
π Explanation of Time and Space Complexity of the code
π©βπ» Who Should Watch?
This playlist is for everyone but best suited for Freshers who are new to Recursion.
π Embark on the Recursive Adventure Now!
My DP Concepts Playlist : https://youtu.be/7eLMOE1jnls
My Graph Concepts Playlist : https://youtu.be/5JGiZnr6B5w
My GitHub Repo for interview preparation : https://github.com/MAZHARMIK/Interview_DS_Algo
Subscribe to my channel : https://www.youtube.com/@codestorywithMIK
Instagram : https://www.instagram.com/codestorywithmik/
Facebook : https://www.facebook.com/people/codestorywithmik/100090524295846/
Twitter : https://twitter.com/CSwithMIK
Approach Summary : The Tower of Hanoi problem involves moving a stack of n disks from one rod to another, using a third rod as an auxiliary, such that no larger disk is placed on top of a smaller one during the process. The toh method takes four parameters: n (number of disks), from (source rod), to (destination rod), and aux (auxiliary rod). The function recursively solves the Tower of Hanoi problem, printing the steps to move each disk from the source rod to the destination rod. The count of total moves is returned. The base case is when n is 1, in which case it directly moves the disk and returns 1. Otherwise, it recursively solves the problem for n-1 disks, prints the move for the current disk, and then again recursively solves the problem for n-1 disks on the auxiliary rod. The total count of moves is calculated and returned.
βββ¦βββ¦ββββ¦ββ¦β¦β¦β¦ββββ
βββ£βββββ£ββ£ββ£ββ£βββ£ββ£
β βββββββ ββββ£βββββββ£
βββ©βββ©ββ©ββ©ββ©βββ©ββ©ββ
β¨ Timelinesβ¨
00:00 - Introduction
0:14 - Motivation (Bhashan)
00:47 - Problem Explanation
5:23 - Intuition Building
6:33 - Writing Story Points
13:48 - Story To Code
17:06 - Time Complexity and Space Complexity
22:02 - Let's Code it up
#codestorywithMIK
#coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview#interviewtips #interviewpreparation #interview_ds_algo #hinglish #github #design #data #google #video #instagram #facebook #leetcode #computerscience #leetcodesolutions #leetcodequestionandanswers #code #learning #dsalgo #dsa #2024 #newyear #RecursionExplained #CodingJourney #Programming101 #TechTalks #AlgorithmMastery #Recursion #Programming #Algorithm #Code #ComputerScience #SoftwareDevelopment #CodingTips #RecursiveFunctions #TechExplained #ProgrammingConcepts #CodeTutorial #LearnToCode #TechEducation #DeveloperCommunity #RecursiveThinking #ProgrammingLogic #ProblemSolving #AlgorithmDesign #CSEducation