Тёмный

Tower of Hanoi | Recursion 

Aditya Verma
Подписаться 249 тыс.
Просмотров 169 тыс.
50% 1

Опубликовано:

 

18 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 353   
@sumitkeshav4718
@sumitkeshav4718 4 года назад
Bhai u will revolutionize the teaching standards on youtube!!!. Well for me, i think you have already done it. Hats off bro.
@atulpant6369
@atulpant6369 4 года назад
Priest logo n bolo thoda zyada hora h but its ok 😆😆😆 Great content as usual 👍
@TheAdityaVerma
@TheAdityaVerma 4 года назад
😅😅 Thanks !!
@ps7072
@ps7072 4 года назад
😂😂
@ru2979
@ru2979 2 года назад
😂🤣🤣🤣
@pprathameshmore
@pprathameshmore 2 года назад
Yeah sahi tha!
@anonmityslayer
@anonmityslayer 8 месяцев назад
How casually bhaiya said this 😅😅😅
@ronitkumar19
@ronitkumar19 Год назад
Mark the words ...one of the best playlist available for recursion!!!! :)
@CodingEnv
@CodingEnv 2 года назад
Brahmaji bole "coding kar lo , placement aa raha hai". You are the best teacher. The way you explain the complex concepts in simple manner, it is really amazing. Thanks a lot.
@AnkushKumar-mk8ns
@AnkushKumar-mk8ns 4 года назад
Others: Tower of hanoi. Aditya verma: Tower of brahma.😂 Thank you sir for making this playlist. I hope, further we will get more content. 🙏
@arnab027
@arnab027 Месяц назад
Dark
@anniebhalla1237
@anniebhalla1237 3 года назад
Recursion is seriously magic!! And the way you explain it is so amazing !
@googlepay4295
@googlepay4295 2 года назад
but im getting demotivated .. not able to solve any questions from past 25 days
@nopecharon
@nopecharon 2 года назад
@@googlepay4295 Don't play PUBG
@googlepay4295
@googlepay4295 2 года назад
@@nopecharon seriously bro ....its jus name 🤣🤣🤣
@googlepay4295
@googlepay4295 2 года назад
My younger did this
@mayankguptacse5904
@mayankguptacse5904 4 года назад
Never came across such a unique way of teaching things. Thanks for such a great content . Brahmaji ki Jay :)
@shaikirfanameer359
@shaikirfanameer359 4 года назад
bhai how u r teaching in unique manner i think u were blessed with it
@TheAdityaVerma
@TheAdityaVerma 4 года назад
Thanks brother, just developed my own way of learning things !! 😅
@shaikirfanameer359
@shaikirfanameer359 4 года назад
I watched ur every video but today i felt like if i comment today u'll reply me Finally it Happened 😍
@TheAdityaVerma
@TheAdityaVerma 4 года назад
Haha, even if I am unable to reply to every comment on the channel. I make sure to read each and everyone of them !! So don't worry brother, your blessings and comments are reaching out to me. ❤️
@divyanshuyadav5524
@divyanshuyadav5524 3 года назад
@@TheAdityaVerma sahi h ❤️
@ShabnamKhan-cj4zc
@ShabnamKhan-cj4zc 3 года назад
Thank you very much for this video as you are the only one who explained why disk needs to move from source to helper first instead of making statement that it has to be moved. Thanks again for focussing on explaining the logic instead of memorize something.
@sambhute1991
@sambhute1991 3 года назад
Every time I do a recursion problem: My Time Complexity: " Thoda jyada ho rha hai par thik hai"
@tarunstv796
@tarunstv796 2 года назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-VC4V67q2kEk.html
@Amitkumar-fo1lv
@Amitkumar-fo1lv 4 года назад
6:40 bahut pitogee... 😂😂 bhramaji rocked..!
@TheAdityaVerma
@TheAdityaVerma 4 года назад
😅 Bhramaji's Thug Life
@ManuSingh-lt8wr
@ManuSingh-lt8wr 3 года назад
😂🤣
@basketballlove1540
@basketballlove1540 3 года назад
Your teaching style is just amazing. Please keep uploading this type of amazing content.
@tomriddle2427
@tomriddle2427 2 года назад
Aditya... Man you have a great knack of storytelling and that's the reason why you teach so very well. Loved the story... Never have heard it before and the way you narrated it seriously I laughed for like whole of that story time 😂. Thanks a lot.
@kamalkumar7133
@kamalkumar7133 3 года назад
sir u r great. GFG waalo ne dimag ka dahi kar diya thaa aapne achcha sikhaya.🤩🤩
@jatinoza3099
@jatinoza3099 2 года назад
Wow, TBH now i am getting a great confidence in this recursion... really great playlist
@visheshagrawal8676
@visheshagrawal8676 Год назад
From a long time I couldn't able to understand this problem but I got confidence to solve problems similar like this... really improved my way of thinking of recursion
@ajitdhayal1612
@ajitdhayal1612 4 года назад
Brahmaji bhi coding kerte the😂😂
@TheAdityaVerma
@TheAdityaVerma 4 года назад
😅😅
@TheAdityaVerma
@TheAdityaVerma 4 года назад
Brahmaji ki Jay 🙏🙏❤️
@shivamshaw5867
@shivamshaw5867 4 года назад
Aur hum bhi karenge☺️☺️☺️
@akashpurbia4390
@akashpurbia4390 4 года назад
he created universe(brahmaand) so yes.
@sankalparora9261
@sankalparora9261 4 года назад
yeah, that was good.
@aniketmore7409
@aniketmore7409 2 года назад
great job bro!!! you've very unique and great way of teaching things!! you made such complex things so easy !! I appreciate it bro !!
@entc_khushalnikam8124
@entc_khushalnikam8124 3 года назад
Was stuck at this problem from so long . Great explanation . Thank you for these ❤️
@ChandanKumar-wf5sx
@ChandanKumar-wf5sx 3 года назад
Pahali baar kisi ne TOH itne unique aur easy way me samjhaya.. Thanks Aditya bhaiya.. (Aap hamare liye Bramhaji ke Priest ho)
@RicheshGuptaRichu
@RicheshGuptaRichu 3 года назад
video bnana khtm kr doge to universe waps restart ho jaegi
@reckonmazumdar3063
@reckonmazumdar3063 3 года назад
This is some next level way of teaching !!!
@sumitaggarwal9477
@sumitaggarwal9477 28 дней назад
DSA padhane ka tarika thoda casual hai someone recomended this channel to me.....great content
@aryapandey4576
@aryapandey4576 2 года назад
And then he said "to priest logo ne bola, "yaar ye thoda zyada ho rha hai par chalo okay"" Couldn't help laughing xDD Your content is so easy to understand :")
@aashishsah2110
@aashishsah2110 2 года назад
Just Checked out your channel!! Hope you become a better coder and RU-vidr than aditya!✌️
@aryapandey4576
@aryapandey4576 2 года назад
Haha, maybe in another world, thanks for checking out! Means a lot :)
@aadil4236
@aadil4236 Год назад
The best part about the video was the Bhrama story. I loved it. What an amazing story. I heard a story about where a Peasent goes to a King for some rice. So the King asks how much rice does he needs. The Peasent says he needs a single grain of rice for each square in a chess board. The only condition is that you have to double the rice of grain each time you go to a new square. The King was a fool so he agreed to the deal. 2^64 grain of rice is quite much. How much? Well as a proud/weird nerd I went to the internet to find the answer. As it turns out 2^64 grain of rice is roughly equivalent to a millennium(1000 years) of our entire plantes rice production. Yikes!!
@shailypatel585
@shailypatel585 2 года назад
Grate i don't have word to thank you Bro!! mene bhot sare videos dekhe par kisise bhi smj nai aaya even gate ki preparation m bhi sir ne pdaya lekin smj nai aaya but because of you I understood it very clearly !! thank you so much
@AmarMishra
@AmarMishra 2 года назад
Great visualization in explaining this. Visualization will help retain the problem. Thanks.
@vibhutiagrawal5105
@vibhutiagrawal5105 2 года назад
The most hilarious line for me was, brahma ji ne bola, 'choti plate ke upar badi plate mat rakh dena bohot pitoge' XD. You make this too fun bhai
@priyaanshhuu
@priyaanshhuu 11 месяцев назад
this was never so easy to understand aditya bhaiya, you really meant it when you said you would convert us into jedis of recursion, thankyou for doing what you're doing!! :D
@sachetansabhahit6235
@sachetansabhahit6235 4 года назад
TOB was never this easy bro. Hats off
@ritikgalgate7783
@ritikgalgate7783 3 года назад
Sir mene bhot sare videos dekhe tower of hanoi k lekin mujhe samajh nhi aa rha tha . apka video dekh k mujhe ache se samajh aa gaya .thank you sir
@ananysharma9290
@ananysharma9290 4 года назад
Sir Again You explained it in a Really Great manner , love your Channel , Please please Upload Graphs Too
@sahilanand30
@sahilanand30 2 года назад
What a explanation 🔥 Hats off ♥
@usmanaliansari5223
@usmanaliansari5223 Год назад
for count we can directly print that using maths i.e. n disks can be solved in minimum 2^n−1 steps.
@kush3764
@kush3764 Год назад
Thank you bhai especially for the Amazing story...
@NiteshKumar-dn4em
@NiteshKumar-dn4em Год назад
Bhaiya aap same Love Babbar ki tarah samjhate ho....dono hi ek dam OP ho...concept crystal clear ho jate h🙌
@Bharat_Rider
@Bharat_Rider 11 месяцев назад
Great video 👍👍
@shubhankarmane3172
@shubhankarmane3172 3 года назад
This is the best video on Towers of Hanoi.
@utkarshgautam1940
@utkarshgautam1940 2 года назад
code padhne m aur samjane m fark hota hai ,this is is teching how to write code,@Aditya bhiya love u
@rashikakurhade3499
@rashikakurhade3499 2 года назад
Well I must say anyway good teacher is a great story teller. Look at you!!
@babitas5381
@babitas5381 2 года назад
you've made life easier for me this is pure gold content, thanks a lot bhaiya 😊
@vrajupadhyay4755
@vrajupadhyay4755 2 года назад
amazing teaching way of yours thank you.
@fuzi_blossom
@fuzi_blossom Год назад
#include using namespace std; void toh(char s, char d, char a, int n) { if (n == 0) return; toh(s, a, d, n - 1); // move the n-1 discs from source to aux using destination rod cout
@sudhanshuraj8632
@sudhanshuraj8632 Год назад
might be this story is correct but I am known to the fact that there is only one temple for brahma dev in entire world, and these has many reasons that are there in hindu mythlogy, one is he was cursed to have just one temple, and that is in pushkar, but the explanation was fabulous sir, no one can make it much easier
@sumitapathak2900
@sumitapathak2900 4 месяца назад
"zyada ho rha hai par kar lenge" was 😅😂 Amazing lecture
@sarthaktomar4686
@sarthaktomar4686 8 месяцев назад
Real power of recursion!!!!!!!!!💪💪💪💪
@armaankashyap366
@armaankashyap366 2 года назад
Nyccc bro mene abhi bahut jagah se samjha iska code but meko yaha se clear ho gaya thanku bhaai 🤗
@jayantkumar4-yearb.tech.ci302
@jayantkumar4-yearb.tech.ci302 2 года назад
Brahma ji v coding karte the , toh chalo hamlog v karte h. hamlog toh Aditya bhai aapkji wajah se kar paa rhe h Thanks bro..
@kailashchandra2666
@kailashchandra2666 Год назад
one of the best technique......Best mentor🤩🤩🤩🤩🤩🤩
@offensive-brat
@offensive-brat Год назад
man of culture
@roushanraj8530
@roushanraj8530 3 года назад
#storytelling awesome bhaiya 😍😍 Brahmaji apne aditya bhai ko ye task dete, ek program me khel khtm, 😅😅
@hrithikdhanraj2919
@hrithikdhanraj2919 3 года назад
.Achcha hai nhi diya wrna sab chutkiyo me finish
@himanshumalik6913
@himanshumalik6913 2 года назад
Exact same code in Java: import java.util.*; class Main { public static void main(String[] args) { Scanner scn = new Scanner(System.in); int n = scn.nextInt(); int s = 1, d = 2, h = 3; solve(n , s, d, h); } public static void solve(int n, int s, int d, int h){ if(n == 1){ System.out.println("Moving plate " + n + " from " + s + " to " + d); return; } solve(n - 1, s, h, d); System.out.println("Moving plate " + n + " from " + s + " to " + d); solve(n - 1, h, d, s); } }
@reshavraj4090
@reshavraj4090 3 года назад
c++ solution:- long long count=0; long long toh(int N, int from, int to, int aux) { count++; if(N==1) { cout
@kaanchacheena8087
@kaanchacheena8087 2 года назад
Great way of teaching, keep going brother !!!
@sajidmanzoor1184
@sajidmanzoor1184 4 года назад
Solve the following puzzle for Tower of Hanoi · If puzzle can be accomplished in 3 moves with two discs. Use this to work out how many moves would be needed with three discs? · If puzzle can be completed in 15 moves with four discs. Use this to work out how many moves would be needed with five discs? · In general, describe a way of working out how many moves are needed when one extra disc is added? ye kese hoga
@mohan_792
@mohan_792 Год назад
2^n - 1; where n == number of discs
@sohebshaikh3344
@sohebshaikh3344 3 года назад
void towerOfHanio(int n, char src, char dest, char helper) { if (n == 0) return; towerOfHanio(n - 1, src, helper, dest); cout
@MOHITRANA-to7rf
@MOHITRANA-to7rf 2 года назад
JODDDD
@harshvardhandixit5046
@harshvardhandixit5046 2 года назад
Thanks a lot I'll never have to memorize the TOH code ever again!
@AbhishekGupta-cr1mf
@AbhishekGupta-cr1mf 3 года назад
Bahut Behtarinnnn.... tarike se samjh Aa gya , Aaditya BHai 👍👍😎😎 ->> KOi gold medal do Inko 😆
@amartyadas5-yriddmechanica597
@amartyadas5-yriddmechanica597 2 года назад
Today I understood the term "Recursion works like magic"
@RohitSharma-hd4me
@RohitSharma-hd4me 3 года назад
me - which compiler do you use ?? brahma ji - priest
@nopecharon
@nopecharon 2 года назад
You are the best teacher
@sanjayjoshi8807
@sanjayjoshi8807 3 года назад
where did you learn this from because never seen such an explanation like this bro plz tell this bro !! you are amazing liked and subscribed and make a video on books and online material for the best understanding of ds and algo as you used !!!!!!
@TheAdityaVerma
@TheAdityaVerma 3 года назад
haha I didnt learn this from anywhere, as the time passed I started to make my own methods and started to see patterns that were never mentioned anywhere before. You will too, just keep practising.
@sanjayjoshi8807
@sanjayjoshi8807 3 года назад
@@TheAdityaVerma okay bhaiya thankyou ! keep growig
@Ashish123
@Ashish123 3 года назад
thanks a lot mere bhai for the explanation of the code because i was confused how its code work but now you have cleared all my doubts :-)
@nishantgupta6902
@nishantgupta6902 Год назад
code: public: long long solve(int n, int from, int to, int aux, long long &cnt){ cnt++; if(n==1){ cout
@human75788
@human75788 2 года назад
Outstanding Teaching!
@PythonGuruji
@PythonGuruji 4 года назад
bro mouse se itni jldi likh lete ho ya fr touch pad laptop ka??
@jayprakashsaini611
@jayprakashsaini611 3 года назад
The diagram of 'Priest logo' 😂😂 PS : 4:17 , 6:57 😂😂 😂😂
@kundankumargupta7414
@kundankumargupta7414 2 года назад
I had heard this story from Sharma sir😀😀😀
@ntesla5
@ntesla5 4 года назад
wonderful explaination as usual
@mrdevtelugu
@mrdevtelugu Год назад
Wah I loved the introduction
@vishalgupta9620
@vishalgupta9620 2 года назад
I have a question , this was a little complex solution that had too many variables to track for dry running this code on paper but that didn't matter because of recursion and we solved it easily if we come across a rec code of similar type and had understand it without compiling it can we do it like we solved it (from n to n-1 i mean ) will that be ok
@jagritbhupal5836
@jagritbhupal5836 4 года назад
Bhai time mile to Josephus problem pe ek video bna dena.
@ExplooreWithManoj
@ExplooreWithManoj 3 года назад
Nice explanation...
@kartikkathuria7506
@kartikkathuria7506 Год назад
Pdf notes ke liye 3$ Pocket me ready rakhein!! Dhanyavad
@kumarirashmi6828
@kumarirashmi6828 4 года назад
Thank u bhaiya for such a wonderful explanation
@subratasatapathy3822
@subratasatapathy3822 2 года назад
Can't we pop the source stack and push to helper stack(it will be reversed).Then pop the helper stack and push to destination(reversed->reversed: original)?
@mohan_792
@mohan_792 Год назад
We can't keep larger discs on smaller discs... If we reverse them, this rule will be violated. So, ....
@anujchoudhary5645
@anujchoudhary5645 2 года назад
Why I am coding because I love coding? Hell no . "Brahama ji bhi coding krte the isska mtlb humme bhi coding krni chahiye"- Aditya Verma
@piyushmishra4988
@piyushmishra4988 4 года назад
bro, which tools you use for video recording and writing?
@yatinarora1252
@yatinarora1252 3 года назад
he is using some sort of ipad for writing and for recording it must be kine master
@udaypandey5659
@udaypandey5659 2 года назад
yar mera time to logo ke funny comments padhne me chala jata h 🤣🤣🤣🤣, bhai ka to logic works like magic , ek bar me hit kar jata h mind me , bas yahi soch reha hu bramha ji kis comapany me honge aur unka package kya hoga abhi 🤣
@arbaajkhan4591
@arbaajkhan4591 4 года назад
Bhai level h seriously , amazing 💯💯
@nishanb9721
@nishanb9721 3 года назад
Great content 🔥
@satyamchauhan9234
@satyamchauhan9234 2 года назад
your channel is brahmastra!!
@degavathanandnayak9692
@degavathanandnayak9692 3 года назад
Great explanantion!
@sumitsaini589
@sumitsaini589 4 года назад
Hahaha Nice concept man xD Love your videos ;)
@tsupreetsingh
@tsupreetsingh 4 года назад
Bhai Graphs par bhi bano do ek playlist , bohot help hoga !! 🙏🙏
@kishanmishra9802
@kishanmishra9802 4 года назад
Great teacher
@rakhsanthrakhy1587
@rakhsanthrakhy1587 3 года назад
Looks like at the end of this problem Bhrammaji ka recursive stack memory complete hogi and new system(universe) banayega :) :)
@atulwadhwa192
@atulwadhwa192 2 года назад
At 10:19 For smaller input why can't we pop the top of the stack and then remaining n-1 ele par solve func lagaye and the hypothesis can be moving all n-1 from source to destination and then in the induction step we push the poped element at pole 3. Can someone clear what's wrong with this approach?
@ArvindYadav-gy7fj
@ArvindYadav-gy7fj 2 года назад
it cannot be done bcoz when u pop it means u are storing it in any of the one pillar(either helper and destination) and then it cannot be solved for remaining disc by only using one pillar bcoz in the pillar storing the top disc u can't put any other disc as it it is of the least size.
@kairatopa9564
@kairatopa9564 4 года назад
Great bro
@HeWhoShalNotBeNamed_
@HeWhoShalNotBeNamed_ 2 года назад
one classic misconception i faced was that while taking the help of helper, even then i have to stay mindful of the condition that its always smaller above the widder one. thus i was overthinking on it. xD
@nsudhir_here
@nsudhir_here Год назад
You have to be mind about that condition even while taking the help of helper.
@ichigo_kurosaaki
@ichigo_kurosaaki 8 месяцев назад
Java Code with Count: public long toh(int N, int s, int d, int h) { if(N == 1) { System.out.println("move disk " + N + " from rod "+ s +" to rod " + d); return 1; } long count = toh(N - 1, s, h, d); System.out.println("move disk " + N + " from rod "+ s +" to rod " + d); count = count + toh(N - 1, h, d, s) + 1; return count; }
@hope-jh7bv
@hope-jh7bv 3 года назад
Thank you so much sir.
@deepthiacharya9991
@deepthiacharya9991 Год назад
Thank you sooo much sir🥺❤
@sudhanvah3222
@sudhanvah3222 2 года назад
Aditya really apricate the good work, could you please improve the audio qualities of the videos.
@paritoshdadhich2954
@paritoshdadhich2954 3 года назад
bhramaji bole placement aa raha hai coding karo... bhramaji jaisa bole vaisa hai karne ka :) great content... ab kabhi nahi bhuluga iska solution hahahah
@h6_wingers
@h6_wingers Год назад
Thank u sir
@babbarutkarsh7770
@babbarutkarsh7770 4 года назад
Bhai feel aa gyi aaj.🔥
@oqant0424
@oqant0424 2 года назад
11/19 done🙌 working code (to those who r facing difficulty in code) long long toh(int N, int from, int to, int aux) { // Your code here long long count = 1 ; if(N==1){ cout
@piyushji2312
@piyushji2312 4 года назад
another masterpiece, awaz thodi aur tez hoti toh din hi ban jata xD
@TheAdityaVerma
@TheAdityaVerma 4 года назад
Have Ordered a new mic, audio quality will improve in future videos.
@piyushji2312
@piyushji2312 4 года назад
@@TheAdityaVerma Itni mehnat k baad aaj reply mila... bas utna hi kaafi h bro.. 😂
@TheAdityaVerma
@TheAdityaVerma 4 года назад
Sorry bro, I may not able to reply to all the comments, but I read every single of them, so your messages and comment are reaching me 😅❤️ Dont worry ✅
@worldcitizen7890
@worldcitizen7890 3 года назад
bohot zabardast video hai bhai...bas agli bar thoda short rakhna best of luck
@rishikeshkumarsingh3283
@rishikeshkumarsingh3283 4 года назад
maza aa gya story sun ke..
Далее
Towers of Hanoi: A Complete Recursive Visualization
21:13
Kth Symbol in Grammar
23:32
Просмотров 121 тыс.
Inside Out 2: BABY JOY VS SHIN SONIC
00:19
Просмотров 4,6 млн
Fun Python Project. Recursion and the Towers of Hanoi
22:29
Count Occurrences Of Anagrams | Sliding Window
39:56
Просмотров 225 тыс.
Tracing of Recursive Calls in Tower of Hanoi
14:12
Просмотров 29 тыс.