Solving Tower Of Hanoi Problem With Recursion

preview_player
Показать описание

Smash that 'Like' button and hit 'Subscribe' to stay ahead in the coding game. Let's go on this coding adventure together! 💫

Playlists curated for our students: 👇
Рекомендации по теме
Комментарии
Автор

It would have been nice if you could have shown a recursive tree as well.

allenalex
Автор

the sound quality of CN classes are Really Really Really awesome...(kind of appealing).

amangupta
Автор

great explanation, just a small tip since you have already made the hint video can you please add it in recursion assignment 1b q5 as well since the hint video is not present there

vaibhavmurarka
Автор

i appreciate your hardwork sir and also, learning from our courses i am from july batch 2022

sanchittripathi
Автор

Just a Joke:
Sir:Hanoi problem is super
after sometime :
ye kaise hogi sorry😂😂😂😂😂😂😂

tuntunewala
Автор

i was having problem in understanding this topic, so searched on youtube. thankfully i got the best explanation.

nsg
Автор

"if I have n-1 disks, I can assume that I can move the using a helper"... how does this assumption work?

Hoxolotl
Автор

But you can't move more than one disk at a

lsdxsaurabh
Автор

if u can move n-1 which is 3 disk at once then why u cant move 4 disk directly?

ajaywavare
Автор

Sir plz make video on placements happening from coding ninja course.
It will encourage more people to join and understand the placement scenario in coding ninja.

shubhamgupta
Автор

Thank you sir, understood the explanation perfectly

aakritiroshan
Автор

thnx for breaking down this problem it is super easy


void tower(int n, char source, char helper, char destination){
if(n==1){
cout<<source<<" "<<destination<<endl;
return;
}else if(n==0){
return;
}
tower(n-1, source, destination, helper);
cout<<source<<" "<<destination<<endl;
tower(n-1, helper, source, destination);
}

saumilaggarwal
Автор

Thanks for teaching in english sir, please continue this

azraazra
Автор

There is a condition we can move only one at a time

Sumer-ztcu
Автор

Watch reducible' s video on tower of Hanoi for in depth analysis

suyashrahatekar
Автор

best explanation i have seen so far. thanks sir

codingdose
Автор

Improve your handwriting sir .. Never thought I would get the chance to say this to a teacher

aintEvanescence