Tower of Hanoi solved using Recursion | Recursion Euler Tree in JAVA

Поделиться
HTML-код
  • Опубликовано: 19 окт 2024
  • Please consume this content on nados.pepcoding.com for a richer experience. It is necessary to solve the questions while watching videos, nados.pepcoding.com enables that.
    NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. In this video, we discuss the solution of the popular puzzle - Tower of Hanoi using recursion. With this code, we explain the Euler tree formed for the recursive logic and also the memory for this code. In this problem,
    1. There are 3 towers. Tower 1 has n disks, where n is a positive number. Tower 2 and 3 are empty.
    2. The disks are increasingly placed in terms of size such that the smallest disk is on top and largest disk is at bottom.
    3. You are required to
    3.1. Print the instructions to move the disks.
    3.2. from tower 1 to tower 2 using tower 3
    3.3. following the rules
    3.3.1 move 1 disk at a time.
    3.3.2 never place a smaller disk under a larger disk.
    3.3.3 you can only move a disk at the top.
    To understand this puzzle, click here: • Tower of Hanoi - Quest...
    To attempt and submit this question, click here: www.pepcoding....
    For a better experience and more exercises, VISIT: www.pepcoding....
    #recursion #algorithms #towerofhanoi
    #pepcoding #programming #freeonlinecourses
    Have a look at our result: www.pepcoding....
    Follow us on our FB page: / pepcoding
    Follow us on Instagram: / pepcoding
    Follow us on LinkedIn: / pepcoding-education

Комментарии • 289

  • @mathis-meth4229
    @mathis-meth4229 3 года назад +234

    This man has himself struggled enough with ds algo
    That's why he knows all the thoughts every struggler goes through
    Hatts off guru 👍

  • @shazibrahman6218
    @shazibrahman6218 3 года назад +88

    at least someone who interested in clearing the concept rather than just coding

  • @nsandeep7574
    @nsandeep7574 3 года назад +107

    "Believe in your faith to meet your expectation" - Story of Recursion ;)

    • @yajurvedgupta9195
      @yajurvedgupta9195 2 года назад

      Nope- believe in sir's faith to meet your expectations.

    • @nsandeep7574
      @nsandeep7574 2 года назад +3

      @@yajurvedgupta9195 i meant in a general way boy

  • @avinash7786
    @avinash7786 4 года назад +59

    Sir You are really awesome...Literally the effort you are making to teach everyone is too Good...baar baar diagram bnakr samjhana..Jaise hi lgta hai ki is point me thoda doubt ho gya aage hi aap diagram bnake samjha dete ho..really very nice..God bless you..Aise hi help krte rhe life bn jaaye logo ki..Thank You soooooo much once again Sir!!

    • @Pepcoding
      @Pepcoding  4 года назад +9

      Thanks man. I request you to write us a LinkedIn or a fb post. Baaki bacho ka bhi bhla hoga

    • @AmanKumar-kz1rn
      @AmanKumar-kz1rn 4 года назад +3

      jitni tarif karo sir ki utni kam hai
      god gifted ho sir aap with this teaching skills

  • @RajKumar-ij8ld
    @RajKumar-ij8ld 4 года назад +47

    Now I believe in faith, sir. Thank you

    • @Pepcoding
      @Pepcoding  4 года назад +1

      You're welcome

    • @AryanSharma-dh4fb
      @AryanSharma-dh4fb 3 года назад +2

      @@Pepcoding I just have one question, if you have time then please try to answer it :
      What logic/condition of our function is making it sure that no matter what, a bigger disk will never be placed on on smaller one ?
      I know the function is totally right and I even dry run it, so the working is also clear to me. But even after knowing that I can comprehend who exactly is it in the code that takes care of not putting bigger disk on the smaller one. IF ANYBODY KNOWS THIS, PLZ ANSWER IT.

    • @aartikushwaha6328
      @aartikushwaha6328 3 года назад +4

      @@AryanSharma-dh4fb We are only moving (n-1) which is always less than n...I guess this is the part that takes care of the rule that you are talking of.

    • @parasmyname784
      @parasmyname784 3 года назад +1

      In our faith, we obeyed all the 3 rules ... and while using our faith, we obeyed all the 3 rules ...

    • @SMARTCLIQ
      @SMARTCLIQ 4 месяца назад

      @@AryanSharma-dh4fbour faith

  • @akshitrawat1313
    @akshitrawat1313 2 года назад +1

    pure youtube mai kisi ne itni acchi tarah ni samjaya hoga jitna aapne samjaya sir❤❤❤❤❤

  • @srishtigugoriya9319
    @srishtigugoriya9319 3 года назад

    itni videos me mujhe 1 doubt bhi nhi aya...........itna crystal clear mujhe ajtak smjh nhi aya...
    🙌

  • @kumarpriyanshu4735
    @kumarpriyanshu4735 4 года назад +13

    One of the best explanation for Tower of Hanoi Problem. My concepts of recursion really got improved from your videos.

    • @Pepcoding
      @Pepcoding  4 года назад +1

      I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem.
      If you like my efforts, I request a review
      g.page/Pepcoding/review?rc

    • @AryanSharma-dh4fb
      @AryanSharma-dh4fb 3 года назад +1

      I just have one question, if you have time then please try to answer it :
      What logic/condition of our function is making it sure that no matter what, a bigger disk will never be placed on on smaller one ?
      I know the function is totally right and I even dry run it, so the working is also clear to me. But even after knowing that I can comprehend who exactly is it in the code that takes care of not putting bigger disk on the smaller one. IF ANYBODY KNOWS THIS, PLZ ANSWER IT.

    • @shubhamaptekar7748
      @shubhamaptekar7748 3 года назад

      @@AryanSharma-dh4fb same help me too

  • @datastructure7266
    @datastructure7266 3 года назад

    Tower of hanoi k saath aisa chamatkar maine pahle kabhi nai dekha.... simplest and best explanation I have ever seen.

  • @lakshyasinghchouhan2850
    @lakshyasinghchouhan2850 2 года назад +1

    bhai sahab yeah vo teacher hai jiske liya dil sa awaj nikelti hai hi ki video like kiya bina nahi jaana . what a mind blowing teacher yaar
    it took me full day to understand tower of hanoi question , but this man explain it so nicely and gradually that is just amazing just amazing

  • @saketkashyap4896
    @saketkashyap4896 Год назад

    Literally mere pass words nhi hai itna clear explanation RUclips par kya kahi par bhi nhi milega so much love sir ❤❤❤❤

  • @RRS.Tripper
    @RRS.Tripper 5 месяцев назад

    After sifting through countless RUclips videos on recursion and investing hours of my time, I finally stumbled upon this gem. Even though I had a grasp of the basics - like printing numbers from 1 to n or n to 1, calculating sums, factorials, fibonacci, etc. - using recursion, I still chose to start from scratch with this playlist. I managed to tackle the zigzag pattern on my own from the previous video, which in turn prepared me to grasp the Tower of Hanoi problem in this video, a concept that had previously seemed quite alien to me.
    But after watching this particular lecture, I'm certain that this logic and approach to problem solving will stick with me forever. Thank you very much sir, for your invaluable guidance.

  • @analyticswithjaspreet
    @analyticswithjaspreet 3 года назад +2

    Best teacher ever , an ultimate legend , Hats off to Sumeet Sir !

  • @CleanDevelop
    @CleanDevelop 3 года назад

    dil khush hogya bhai dekh kar, baki ke channel ne kisi ne itne depth m nahi btaya tha, ab apki videos hi follow krne wala hun ds ke liye

  • @HarmanSingh-tp7xs
    @HarmanSingh-tp7xs 3 года назад +4

    Great teacher, amazing explanation. Everyone needs an excellent teachers like you sir !

  • @fitincubicles
    @fitincubicles 3 года назад +1

    Sir you are true gem itna padha tower of hanoi even code rat liya tha pr aapki video se conceptually samaj AAya sirf ek video dekhne aaya tha aab Puri playlist khatam krke jaaenge thank you very much sir

    • @Pepcoding
      @Pepcoding  3 года назад

      Thankyou beta!
      I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.
      If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )

  • @potato-gi1xr
    @potato-gi1xr 3 года назад +4

    watched till 8:16 , and solved the question.
    I knew recursion already, but sir you cleared the concept like no one else.🙏🙌
    thank you so much sir.

  • @madgeek5652
    @madgeek5652 3 года назад +4

    literally i did a course in an local institution in delhi and they taught the same way he is teaching , even better. I gave around 13k there and he is teaching free of cost. Thank You Sir for sharing knowledge and putting this much efforts.

  • @mrugendrashilvant8358
    @mrugendrashilvant8358 3 года назад +1

    The way you discuss the problems with the required thought process is really great! Learning a lot from you...Thanks a ton!

  • @ritikshrivastava9442
    @ritikshrivastava9442 3 года назад +5

    humare expectation hai ki hume recursion sikhna hai
    hume faith hai ki humne recursion sikh liya
    expectation and faith me link - after watching pepcoding videos

  • @shawnm2355
    @shawnm2355 8 месяцев назад

    thank you sirr!!! literally over the whole youtube, ONLY YOU made me understand it so deeply. I'll never forget it in my lifetime.

  • @garimagarg9065
    @garimagarg9065 3 года назад +6

    Sir I can't really thank you enough for making dsa easy for me. Your explanation made this so easy.

    • @Pepcoding
      @Pepcoding  3 года назад

      Thankyou beta!
      If you like our efforts, we request a review-g.page/Pepcoding/review?rc

  • @ShootOniPhone914
    @ShootOniPhone914 2 года назад +1

    sir sach me maja aa gya esa vidio pure youtube me nhi milega , ek dum basics se samjhaya he sir apne . sach me ajj mera pura concept clear ho gya

  • @revanthvenkateswar622
    @revanthvenkateswar622 3 года назад +1

    Sir you are a blessing for people like me who are from a non CS background with no formal education but looking to break into the industry. Thank you for such a wonderful explanation. Pata hi nai chala kaise time paar ho gya puri video dekhte hue. Thanks a lot !!

  • @Tarun-Mehta
    @Tarun-Mehta 3 года назад

    Watching your video is more of fun , The way you clear the concept, the way you teach. No one in the entire planet can do this. Respect 🙏🙏. Thank you very much

    • @Pepcoding
      @Pepcoding  3 года назад

      wow, this cheers me up. I am glad we at pepcoding could be of help to you. Keep learning. Also, recommend us to your juniors and peers, they may also benefit.

  • @abhipsamohapatra852
    @abhipsamohapatra852 4 года назад +1

    Your teachings are love..I cannot explain how much I adore you for taking the teachings in Java.Your the only teacher doing that and very soon its going to increase your followers.

  • @stellagabriella9085
    @stellagabriella9085 3 года назад +7

    My crush proposed me after I explained this infront of the class. He blocked me when I chose honesty and referred him to pepcoding 😝

  • @TuringTested01
    @TuringTested01 3 года назад

    sir you are next level... sumeet sir ki bolne ki style se hi lagta hai ki he is so enthusiastic and sincere about making the students understand everything.

    • @Pepcoding
      @Pepcoding  3 года назад

      Thank you for appreciating.
      The love and respect which I get from you people keep me highly motivated and the same I am able to forward It to you people through my videos.
      So, keep motivating, keep learning and keep loving Pepcoding😊

  • @shubhamtiwari5057
    @shubhamtiwari5057 Год назад

    I was so frustrated not getting the right explanation anywhere for this problem and many too but now i will say now i got the one on the internet feeling blessed 😅

  • @madhavmundhra2698
    @madhavmundhra2698 2 года назад

    I don't know if it is a magic or what but this man exactly knows where we as students watching this will be struggling and he already has created the way to resolve it. God bless you for the work you have been doing and bless us to have a teacher like you ! 😃

  • @tarungupta9780
    @tarungupta9780 2 года назад

    sumeet sir a legend, people create so much confusion in this question and sumeet sir clear this with no time

  • @shubhamtiwari5057
    @shubhamtiwari5057 Год назад

    We students of this generation needs like you and its very rare in World

  • @sudhanshusharma9123
    @sudhanshusharma9123 4 года назад +2

    Thank you sir !! This problem has been my nightmare for years, I never even tried solving it and now you made it so easy to understand.

  • @alfiyazahra4680
    @alfiyazahra4680 3 года назад +1

    Sir Sir Sir.....u are just great...
    thankyou so much...
    never thought that someone can make recursion that understandable....

    • @Pepcoding
      @Pepcoding  3 года назад +1

      Happy to help and If you like our efforts, please upvote the comments written by the students about Pepcoding here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )

  • @himanshurane4847
    @himanshurane4847 3 года назад +3

    This man has himself struggled enough with ds algo
    That's why he knows all the thoughts every struggler goes through

    • @Pepcoding
      @Pepcoding  3 года назад +3

      wow, this cheers me up. I am glad we at pepcoding could be of help to you. Keep learning. Also, recommend us to your juniors and peers, they may also benefit. If you like our efforts, we request a review
      g.page/Pepcoding/review?rc
      You can subscribe to our channel here
      ruclips.net/user/Pepcodingabout?view_as=subscriber

  • @tushargupta3236
    @tushargupta3236 4 года назад +3

    Now I am loving recursion, seems complex but is amazingly simple

    • @Pepcoding
      @Pepcoding  4 года назад +1

      I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem.
      If you like my efforts, I request a review
      g.page/Pepcoding/review?rc

    • @tushargupta3236
      @tushargupta3236 4 года назад

      @@Pepcoding reviewed already :) Thank you for the free and organised content !

  • @annushasinha6207
    @annushasinha6207 3 месяца назад

    first mein thoda confusing laga then jo samajh mein aya last mein bhai waaahhh👏👏👏👏👏

  • @sarthaknikhal5540
    @sarthaknikhal5540 3 года назад +4

    I understood recursion and that the steps of expectation, faith and expectation + faith are important to solve. We keep faith and it actually works. I think there is some magic in this. Such an interesting concept, recursion. Thank you Sumeet sir, I like the way you teach. Also, I really like the fact that he addresses his students as "bachcho", even though most of his students/viewers are 17+ in age. 😅

  • @shubhamtiwari5057
    @shubhamtiwari5057 Год назад

    Sir please don't quit teaching at any cost its humble request to you 🙏

  • @aviiraj_sharma
    @aviiraj_sharma Месяц назад +1

    Thank you so much bhai 😊
    Sir isliye nhi kyuki bada bhai pada rha ho esi feel aati hai 😅
    Lots of love 🥰

  • @KiranYadavOG
    @KiranYadavOG 2 года назад

    It's the best recursion playlist on youtube...!! Thanks!

  • @amitranjan7111
    @amitranjan7111 3 года назад +1

    Thank you so much sir. Yours DSA teaching technique is jst amazing.

  • @shivkaraman
    @shivkaraman 3 года назад

    You deserve to have millions of views and subscribers sir. Next level explanation.

  • @sudipsarkar1512
    @sudipsarkar1512 Год назад

    DSA ka asli maza Aaj AA Gaya .... Sumeet sir is truly G.O.A.T ❤️🔥

  • @rudranshnemade6299
    @rudranshnemade6299 Год назад

    Best explaination of Tower of Hanoi , Thank you so much sir
    HUGE RESPECT🙏🙏🙏

  • @vaishnavi4354
    @vaishnavi4354 3 года назад +2

    The Combo pack of patience and knowledge 😎😎
    #unbeatable
    have faith on faith 😎

  • @abhinavsahai3064
    @abhinavsahai3064 3 года назад

    when every1 is busy in c++.
    youre helping icse students brushing concepts using java.
    LOGIC GURU hain aap

    • @Pepcoding
      @Pepcoding  3 года назад +1

      Keep learning, Keep growing and keep loving Pepcoding!😊

  • @pratyushpradhan1844
    @pratyushpradhan1844 3 года назад

    Sir you are GOD .!! i was so frustrated regarding this recursion thing . Now after watching your playlist everything's clear. Thank you so much sir

  • @AbhishekGupta-cr1mf
    @AbhishekGupta-cr1mf 3 года назад

    Now I believe in faith, sir. Thank you
    Sala Pura Dimag hil jata he , Sumeet Sir ke padhane se , MAJA aa gyaa Guruji , Bahut hi Aasani se koi bhi problem solve krwate ho 😍😀😍

    • @Pepcoding
      @Pepcoding  3 года назад

      wow, this cheers me up. I am glad we at pepcoding could be of help to you. Keep learning. Also, recommend us to your juniors and peers, they may also benefit.

  • @ankitrookies2357
    @ankitrookies2357 3 года назад +1

    I watched others videos on recursion all are confusing and u how simply explain all the deep things thanks sir #GodOfRecursion

  • @ishitaroy2238
    @ishitaroy2238 2 года назад

    Never knew until now that tower of hanoi is this much easy. Thank you sir, you are amazing.

    • @Pepcoding
      @Pepcoding  2 года назад +1

      Happy to help!
      Keep learning.
      And for better experience and well organised content visit nados.pepcoding.com

    • @ishitaroy2238
      @ishitaroy2238 2 года назад

      @@Pepcoding awesome sir🔥

  • @Flash-qr5oh
    @Flash-qr5oh 2 года назад

    😭😭😭 kitna ache se smjhate ho sir thank you so much from bottom of my heart ❤❤

    • @Pepcoding
      @Pepcoding  2 года назад +1

      Pleasure is all mine, For better experience and well organised content sign up to nados.pepcoding.com

  • @JyotiSharma-wb1vy
    @JyotiSharma-wb1vy Год назад

    Just believe on Sumeet sir and all your concepts will get crystal clear😇

  • @sakshiaggarwal6199
    @sakshiaggarwal6199 3 года назад

    Sir bhot ache se samjh aya. Ese samajh aane lage to motivation aajata hai ki haan hum bhi kr skte hain💪

    • @Pepcoding
      @Pepcoding  3 года назад +1

      Glad to know that you liked the content and thank you for appreciating.
      The love and respect which I get from you people keep me highly motivated and the same I am able to forward It to you people through my videos.
      So, keep motivating, keep learning and keep loving Pepcoding😊

  • @AdarshKumar-mf3ls
    @AdarshKumar-mf3ls 4 года назад +2

    Recursion works like magic. Sumit Sir Rocks.

  • @dikshajain9845
    @dikshajain9845 3 года назад

    Thank you very much sir . You teaches very well. This was the first question because of which I thought recursion is very very difficult sometimes and I can never be able to do this question. But after this video recursion has become cake walk for me. You explained it in very detail. Everyone explain this question very fast , and don't go in to deep.
    You are amazing teacher . Thank you sir. Hats off to you sir 👍 .

  • @harshitbajaj7549
    @harshitbajaj7549 3 года назад

    Jeetu Bhaiya of coding, feel karwa dete ho sir aap ,,tysm

  • @475_nehakaushik5
    @475_nehakaushik5 3 года назад

    I am falling short on words ... just can't thank you enough sir !!

  • @logic2789
    @logic2789 2 года назад

    very nice explanation...been watching many videos but yours finally helped me thank you

  • @gagandeepkaur3739
    @gagandeepkaur3739 2 года назад

    Coudn't resist myself from adding a comment, you are doing an absolutely amazing job. 🙂

    • @Pepcoding
      @Pepcoding  2 года назад +1

      Hope you like the video.
      For better experience and well organised content sign up on nados.io
      Don't forget to follow us on Instagram instagram.com/pepcoding/

  • @knacademy20
    @knacademy20 3 года назад

    Jindgi Mai pehli baar tower of Hanoi samnj Aya h

    • @Pepcoding
      @Pepcoding  3 года назад

      Thankyou beta!
      I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.
      If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )

  • @brrrrbhaubhau
    @brrrrbhaubhau Год назад

    Best session on TOH I found today ! Thankyou :)

  • @neerajmahapatra5239
    @neerajmahapatra5239 2 года назад +2

    I have always heard that recursion works like magic.. But this is the first time I felt it too.. 😁

  • @aashishjadhav4415
    @aashishjadhav4415 2 года назад

    today i really understand recursion and started believe on faith

  • @hymnish_you
    @hymnish_you 4 года назад +1

    You are awesome sir, I am addicted to ur videos. Now problems really make sense. Thankyou!

  • @keshavkumar7769
    @keshavkumar7769 3 года назад

    aap saaaaaandaar ho sir , ye question maine kaha kaha nahi padha par kahi samaj me nahi aaya but here in just couple of minutes...

  • @Devildriver4441
    @Devildriver4441 3 года назад

    best video i have ever seen on recursion.Thanks a lot sir

    • @Pepcoding
      @Pepcoding  3 года назад +1

      Glad to know that you liked the content and thank you for appreciating.
      The love and respect which I get from you people keep me highly motivated and the same I am able to forward It to you people through my videos.
      So, keep motivating, keep learning and keep loving Pepcoding😊

  • @priyanshujain2201
    @priyanshujain2201 3 года назад

    You are such a wonderful teacher sir jaldi videos bnao bhout time hogya

    • @Pepcoding
      @Pepcoding  3 года назад

      Beta, Rajneesh bhaiya ko delegate kia hai, vo daal rh h ab video. Main dev ka course bnake dalunga

  • @ankithans5916
    @ankithans5916 4 года назад

    Sir before watching this video I never understood toh problem. But you made it so much easy!! Thanks a lot.

    • @Pepcoding
      @Pepcoding  4 года назад

      I am glad you found it helpful. I request you to drop us a review
      g.page/Pepcoding/review?rc

  • @rohit.1232
    @rohit.1232 3 года назад

    thank u so much sir .DS pdna ab maza toh ab aaya hai

  • @howto8709
    @howto8709 2 года назад

    The Myth, The Man, The Legend Sumeet Sir.
    8th Wonder of World ---> RECURSION

  • @pujasingh1413
    @pujasingh1413 4 года назад

    You are a blessing sir... may you reach heights of success.

    • @Pepcoding
      @Pepcoding  4 года назад +1

      Pleasure!! share among your peers

    • @AryanSharma-dh4fb
      @AryanSharma-dh4fb 3 года назад

      I just have one question, if you have time then please try to answer it :
      What logic/condition of our function is making it sure that no matter what, a bigger disk will never be placed on on smaller one ?
      I know the function is totally right and I even dry run it, so the working is also clear to me. But even after knowing that I can comprehend who exactly is it in the code that takes care of not putting bigger disk on the smaller one. IF ANYBODY KNOWS THIS, PLZ ANSWER IT.

  • @shoryasharma9758
    @shoryasharma9758 3 года назад +1

    sir aaap great ho sirr . pepcoding best hai.

  • @levisingh5660
    @levisingh5660 4 года назад

    You are a Messiah sir. I am very grateful to you. Thankyou !!! Loved the explanation.

    • @Pepcoding
      @Pepcoding  4 года назад

      If you like my efforts, I request a review
      g.page/Pepcoding/review?rc

    • @levisingh5660
      @levisingh5660 4 года назад

      @@Pepcoding Sir I already did it. Any other site to review on? I will do that too :)

  • @srishtidhamal3689
    @srishtidhamal3689 3 года назад

    😭😭 it's too good I thought I am never gone understand it 👌👌👌❤️

  • @chandanverma5179
    @chandanverma5179 2 года назад

    Thank you sir i don't know Java still i am learning recursion and translating those code in to CPP thank you thank you thank you😃😃😃😃😃😃😃😃😃😃

  • @umangbehl8152
    @umangbehl8152 2 года назад

    someone give sir oscar for his dedication

    • @Pepcoding
      @Pepcoding  2 года назад

      Really means lot. For better experience and precisely arranged content visit on nados.io

  • @shailesh9820
    @shailesh9820 3 года назад

    litrally i have never seen this type of explanation on any platform

    • @Pepcoding
      @Pepcoding  3 года назад

      Glad to know that you liked the content and thank you for appreciating.
      The love and respect which I get from you people keep me highly motivated and the same I am able to forward It to you people through my videos.
      So, keep motivating, keep learning and keep loving Pepcoding😊

  • @amandixit3555
    @amandixit3555 3 года назад +1

    I think the language used in the question is a bit miss leading , as you have mentioned in the question " from A to B using C" . but you have directly print disc 3 to B . without using helper . The helper waali cheez is useful only when you have 2 or more disc .

  • @skasrafali8707
    @skasrafali8707 5 месяцев назад

    what a explanation outstanding sir💞💞💞

  • @loserfruit9663
    @loserfruit9663 3 года назад

    This is the most beautiful problem I ever seen

  • @shaurya478
    @shaurya478 3 года назад

    best explanation of tower of hanoi in internet.

    • @Pepcoding
      @Pepcoding  3 года назад

      Thankyou beta!
      I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.
      If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )

  • @uhinger9999
    @uhinger9999 4 года назад

    Such a beautiful and precise explanation. Thank you very much sir. Loving your videos. Just a small request sir, please sir try to upload more videos daily.

    • @Pepcoding
      @Pepcoding  4 года назад +2

      Hanji beta. I am trying my best. Roj 10 to atleast bnana chahta hun.

  • @haqinzmamul12
    @haqinzmamul12 10 месяцев назад

    He is the guy who swear I'll teach you coding... kis gola s aaya h guru..

  • @AjayKumar-ju6sl
    @AjayKumar-ju6sl 3 года назад

    Awesome, I am speechless sir, Believe in faith and then done.

    • @Pepcoding
      @Pepcoding  3 года назад

      Keep it up

    • @Pepcoding
      @Pepcoding  3 года назад

      If you like our efforts, we request a review
      g.page/Pepcoding/review?rc
      You can subscribe to our channel here
      ruclips.net/user/Pepcodingabout?view_as=subscriber
      For clearing your doubts, you can join our community on telegram
      t.me/pepcoding

  • @kashishshukla23
    @kashishshukla23 3 года назад

    you're the best teacher on youtube... :)

  • @RajGupta-fv7xb
    @RajGupta-fv7xb 4 года назад

    Everyone should feel bad for this guy ! He is working so hard and providing excellent content but only 5k views

    • @Pepcoding
      @Pepcoding  4 года назад

      If you like our efforts, we request a review
      g.page/Pepcoding/review?rc
      You can subscribe to our channel here
      ruclips.net/user/Pepcodingabout?view_as=subscriber
      For clearing your doubts, you can join our community on telegram
      t.me/pepcoding

  • @kaustubh9605
    @kaustubh9605 3 года назад

    Disco........
    sir your videos are actually helping thank you

  • @kaustavkumarnag5838
    @kaustavkumarnag5838 4 года назад

    Sir ap bohot acha sikhate ha Thanks sir.

  • @sachingoyal7443
    @sachingoyal7443 3 года назад

    Amazingly done... I am not gonna forget euler now

    • @Pepcoding
      @Pepcoding  3 года назад +1

      Haha..Thankyou beta!
      I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.
      Keep learning and keep loving Pepcoding😊

    • @sachingoyal7443
      @sachingoyal7443 3 года назад

      @@Pepcoding sir.. I am developing softwares for 10 years now for various software giants. I just love your videos, keep up the great job

  • @abhishekshrivastav7941
    @abhishekshrivastav7941 3 года назад +1

    But how do we get the intuition that these function will follow the rule that are stated in first place?

  • @amolmagar987
    @amolmagar987 2 года назад

    i don't get the tower concept, see you putting 1,2 in other tower to place third at bottom postion so,why you dont put 1,2,3 directly to another tower like you are putting 1 and 2 directly over the 3. i think if you put single value at a time ,by my understanding from 3,2,1. 1 goes first and then over it 2 goes like 1,2 not 2,1. i am too much confused plz help.ii

  • @csiddharth380
    @csiddharth380 3 года назад

    Sir this question troubled me alot but thanks to you as now I can do this question even while sleeping

  • @abhineetsingh6720
    @abhineetsingh6720 Год назад

    This is some next level stuff. Glad to have found it

  • @raj_kundalia
    @raj_kundalia 3 года назад

    Watched on 15 October, 2021 - thanks for the video.

  • @sumitverma9169
    @sumitverma9169 2 года назад +1

    Hello Sir, Video is superb... I just have one doubt, could you please make a video on how we can use this code to -->> Move disks from Source -A to Destination C using B? I have tried multiple times but couldn't make it. Please make a video on this also.

  • @AryanSharma-dh4fb
    @AryanSharma-dh4fb 3 года назад +2

    I just have one question, if you have time then please try to answer it :
    What logic/condition of our function is making it sure that no matter what, a bigger disk will never be placed on on smaller one ?
    I know the function is totally right and I even dry run it, so the working is also clear to me. But even after knowing that I can comprehend who exactly is it in the code that takes care of not putting bigger disk on the smaller one. IF ANYBODY KNOWS THIS, PLZ ANSWER IT.

    • @Pepcoding
      @Pepcoding  3 года назад

      that we overselves just move the top disk (smallest) to destination and rest using faith (which follows all rules including this one)

    • @AryanSharma-dh4fb
      @AryanSharma-dh4fb 3 года назад

      @@Pepcoding thank you sir very much for clearing my doubt.

  • @yashbaijal8629
    @yashbaijal8629 3 года назад

    Hi Sir great explanation by you very simple and clear .
    Sir i have 3 years of experience and looking forward for product based companies can you please guide me on which areas of DS and Algo should i focus more or how much i study to clear interview of poduct based companies like microsoft , amazon etc.

  • @abhijeetkumar5828
    @abhijeetkumar5828 2 года назад

    one doubt sir.... At in( system.out.println) line how the disc at A move to disc B just by only printing ???

  • @niteshpandey8207
    @niteshpandey8207 2 года назад +1

    i love the recurion three which you made........mtlb itna kon ghus ghus kr btata hai yr.......

    • @Pepcoding
      @Pepcoding  2 года назад

      Thanks:) For more content like this with a better user experience please visit nados.pepcoding.com