6.4 Hamiltonian Cycle - Backtracking

Поділитися
Вставка
  • Опубліковано 2 лют 2025

КОМЕНТАРІ • 457

  • @msafadonus
    @msafadonus 6 років тому +462

    You Indians! You are amazing! Thank you for your help. Best Regrads from Turkey!

  • @islstudentzone6573
    @islstudentzone6573 6 років тому +400

    Thank u so much Abdul Bari Sir..Your Channel is helping a lot to our CSE & IT Department :)

    • @sohamparmar4976
      @sohamparmar4976 Рік тому +6

      Physics students too by learning classical algorithms and trying to find an efficient quantum algorithm for the same problem.

    • @user-xb3my6zw6r
      @user-xb3my6zw6r Місяць тому

      ​@@sohamparmar4976Pardon my ignorance,do you guys learn these things too?

  • @dorkCatechol
    @dorkCatechol Рік тому +105

    00:05 Hamiltonian cycle is a problem of finding a cycle that visits every vertex exactly once in a graph.
    02:32 There are multiple Hamiltonian cycles possible in a graph
    04:47 Hamiltonian cycles are not possible in a graph that contains articulation points and pendent vertices.
    07:18 The Hamiltonian algorithm starts from vertex 1 and tries to form a valid path.
    09:47 The algorithm checks for cycles in an array.
    12:09 The method is to use the mod function to get the values in a specific pattern.
    14:23 There are two possible Hamiltonian cycles in the given example
    16:34 The Hamiltonian cycle algorithm works by recursively checking for cycles in a graph.
    hope this helps

  • @KevinAMathew
    @KevinAMathew 5 років тому +2021

    I just realised my teacher watches your videos first and then teaches us😂🤦‍♂️

    • @vinothsiva7022
      @vinothsiva7022 5 років тому +41

      Same here😂😂

    • @ZapySolo
      @ZapySolo 5 років тому +68

      same here... our teacher even recommended us to watch his playlist

    • @KevinAMathew
      @KevinAMathew 5 років тому +81

      @@ZapySolo, your teacher is a good person.

    • @mahimsd7645
      @mahimsd7645 5 років тому +63

      All teachers who watch him and then teach are good learner's ...

    • @vaibhavsharma2467
      @vaibhavsharma2467 5 років тому +2

      lol same

  • @hollyj8650
    @hollyj8650 3 роки тому +25

    He is absolutely the clearest teacher on UA-cam and other online sources. Thank you so much

  • @jayapandey5876
    @jayapandey5876 6 років тому +54

    sir, you are a mind blowing teacher. While studying any of your tutorials, i have got no doubts though i had no prior knowledge on the topics. Thank you for making these videos.

  • @Chaitanyat6
    @Chaitanyat6 6 місяців тому +10

    6 years and still one of the best playlist to learn algorithms

  • @MiddleEasternInAmerica
    @MiddleEasternInAmerica 4 роки тому +80

    sending love and respect from EGYPT, thank you

  • @brnakblut
    @brnakblut 2 місяці тому +4

    this man is exact definition of "teacher"

  • @TusharSingh-un9wn
    @TusharSingh-un9wn 3 роки тому +4

    I watch your videos first thing in the morning , as they say, To make your whole day better do something good after you wake up.

  • @dimitarmitranov4436
    @dimitarmitranov4436 5 років тому +17

    Sir, I just want to say, that this is the first Indian scientist who teaches programming or mathematics with an accent I am willing to listen to. Great English, great explanation. Good Job!

  • @yaseenmac3891
    @yaseenmac3891 6 років тому +23

    What a wonderful explanation.
    Keep going sir. Students needs teachers like you.
    -bangalore

  • @emanhussien2325
    @emanhussien2325 7 місяців тому +6

    Too much respect Teacher from Ethiopia ❤❤❤😊😊

  • @pravinnaga3524
    @pravinnaga3524 4 роки тому +37

    There’s a direct entry ticket reserved fr u in heaven fr making me to understand this concept fr my tomorrow algorithm exam 🙃

  • @nohaahmed1948
    @nohaahmed1948 2 роки тому +11

    Your algorithm playlist is really so helpful and pretty clear for complex ones, thanks a million sir.

  • @ShivAdiShakti108
    @ShivAdiShakti108 5 років тому +9

    Sir, You are Pride of Data Structures and Algorithm! A Big Thank You :)

  • @winsont.7403
    @winsont.7403 6 років тому +17

    Thank you very much ! Your video helped solving one of the major challenges to the project we are doing !

  • @srijani_mondal
    @srijani_mondal Рік тому +8

    Just awesome sir.......can't express your help sir throughout my DAA journey....a lot of respect for you sir.....🙏🙏🙏🙏

  • @NaveenNaveen-vj9bo
    @NaveenNaveen-vj9bo Рік тому +60

    Paying lakhs to college but still studying in UA-cam 🤧

  • @thedisciplinedguy
    @thedisciplinedguy 5 років тому +6

    Sir you explain these algorithms so perfectly. I really thank you for helping us in building a strong foundation of algorithms.

  • @程龙-b1w
    @程龙-b1w 6 років тому +20

    You rock, Sir. Complex concept is explained simply and clearly.

  • @spartaninfo3273
    @spartaninfo3273 Рік тому +6

    my teacher directly playing this playlist in class.

  • @venkatanagaeswarkousikneri462
    @venkatanagaeswarkousikneri462 5 років тому +13

    Vidyaniketan students,hit the thumbs here to show thankfulness to sir at the last moment.

  • @naninani9812
    @naninani9812 5 років тому +5

    After watching your explanation there is no chance to dislike....
    Tqq sir

    • @dreamscapeai7
      @dreamscapeai7 5 років тому +1

      So you were disliking before, without watching the video?

  • @nathancarnelos
    @nathancarnelos 4 роки тому +5

    watching this class from brazil, amazing teacher!

  • @sagarmishra6746
    @sagarmishra6746 3 роки тому +23

    I just realised that this is the only way to learn my subject because our teacher never teaches us

  • @kunalkheeva
    @kunalkheeva 2 роки тому +3

    As always the best teacher on internet!!

  • @masongarcia8936
    @masongarcia8936 3 роки тому +6

    Thank you so much Sir! You do an amazing job at explaining these concepts. Much appreciation in the US!

  • @ashokepaul540
    @ashokepaul540 Рік тому +2

    Thank you sir, 🙏🏼 you explained well as nobody else did yet..but it is a NP - complete problem!

  • @dnyaneshwaripatil5566
    @dnyaneshwaripatil5566 5 років тому +4

    Sir thank you. .your teaching was excellent. .what ever your concept logic is to good for student understanding. After watching your videos we are confident about the concept. .

  • @priyeshgautam6270
    @priyeshgautam6270 6 років тому +2

    i had given up on exams, until i saw your tutorials sir thankyou very much :)

  • @kunalwadhai777
    @kunalwadhai777 Рік тому +1

    I had never saw the content like that and the way you explain the algorithm is like a boom fire....Yeah I realize and it is true that if a teacher is expertise in that perticular subject then no one subject is hard for student.

  • @tompower4008
    @tompower4008 4 роки тому +11

    Abdul, based on the information in Corman's book, Travel Salesman and H-Cycle problems are NP-Complete. 1:30 you mentioned it's an NP-hard problem

    • @陳可瀚-w6r
      @陳可瀚-w6r 2 роки тому +3

      NPC is both NP-hard and NP problem

  • @varijadubey2252
    @varijadubey2252 6 років тому +3

    This will help me in my semesters which is due tomorrow!!

  • @alifruslan2728
    @alifruslan2728 2 роки тому +3

    Assalamua'likum, sir. Love from University of Dhaka. Your explanation is way too good Alhamdulillah, and really helpful as well.

  • @sarveshnishad6117
    @sarveshnishad6117 5 років тому +2

    sir i always found everyone blessed you for what you are doing

  • @adiShekhar7
    @adiShekhar7 6 років тому +7

    this is some epic stuff !! the way of explanation is just amazing !

  • @krishnasamandhayala2584
    @krishnasamandhayala2584 6 років тому +12

    great teaching skill. simply rocking sir,

  • @Abuthalharahmani
    @Abuthalharahmani 2 місяці тому +1

    Thanks sir today my design and analysis of algorithms exam they asked this question . ❤

  • @indiandroid
    @indiandroid 5 років тому +53

    Is it me or does this video look normal in 2x speed??????

  • @premprakash5932
    @premprakash5932 6 років тому +18

    Really, impressive. You explained perfectly.

  • @pudisasikar7996
    @pudisasikar7996 4 роки тому +2

    You make complex things dead easy... Kudos Sir

  • @monoman4083
    @monoman4083 6 місяців тому

    I just realised i watch your videos first and then teach my teacher

  • @rajatkesharwani1939
    @rajatkesharwani1939 2 роки тому +1

    u are the teacher of our teacher's

  • @piyushverma8125
    @piyushverma8125 6 років тому +3

    best explanation ever
    Gr8 work sir
    very nice and clearly explained..

  • @sydharthydv
    @sydharthydv 6 років тому +18

    I wish I had a sir like this irl

  • @lazarus6983
    @lazarus6983 2 місяці тому

    Wow amazingly clear explanation. Very good teacher

  • @vinaysonekar2001
    @vinaysonekar2001 2 роки тому +10

    Exact same question, answer and method in my college notes means my teacher first watches Abdul sir's video and then teach us😂
    Thank you Sir for such a good explanation 😊

  • @souravdutta7120
    @souravdutta7120 6 років тому +2

    Wow the best explanation anyone can give. thank you so much.

  • @midhunbabu646
    @midhunbabu646 4 роки тому +1

    This way of describing algorithm is very easy to understand

  • @sivaram9654
    @sivaram9654 6 років тому +27

    *simply,rocking sir*

  • @malinakumar3837
    @malinakumar3837 6 років тому +2

    you are the best teacher i have ever seen

  • @fearless.vishnoi
    @fearless.vishnoi 6 років тому +2

    i realised that our college teachers teach us after learning from these videos

  • @spotlight4091
    @spotlight4091 6 років тому +2

    Very nice explainations sir....This is first time studying,can't understand some topics in this subject...But ur class and explaination, give more clear and good pronounsation to understand...thankq so much sir...continue🙏

  • @boibrainiac
    @boibrainiac 9 місяців тому +1

    you are always with me in my shower before an exam. 🚿

    • @Anji.145
      @Anji.145 9 місяців тому

      He's also with me in the exam 😊

    • @syedaaryan5985
      @syedaaryan5985 9 місяців тому

      Let me also join 😄, ill also bring mausam 👉👈

    • @boibrainiac
      @boibrainiac 9 місяців тому +1

      @@syedaaryan5985STAY AWAY from my mausam. he makes me wetter than the shower

  • @popastefan6542
    @popastefan6542 5 років тому +2

    I wish you would show us the code for every other problem like you do in this particular one. Very nice explanation!

  • @ayaanshafiya4171
    @ayaanshafiya4171 6 років тому

    I want to be a teacher like you....your vedios help me a lot to teach DAA.☺

  • @vaibhawikumari119
    @vaibhawikumari119 6 років тому +5

    Thank you so much sir......it was the best explanation one could ever get

  • @harshpenshanwar5543
    @harshpenshanwar5543 Рік тому +2

    great teaching sir👍👍👍

  • @mohmmadaltalli5180
    @mohmmadaltalli5180 4 роки тому +2

    You are amazing! Thank you for your help. Best Regrads from syria

  • @AshikaAkshini
    @AshikaAkshini Місяць тому

    Thank you🙏, Sir your teaching very useful for AI students.

  • @anupdhoble2879
    @anupdhoble2879 Рік тому +4

    For Revision start at : 7:00

  • @pradipnitw
    @pradipnitw 6 років тому +5

    thanks for the algorithm... love your teaching style Sir..

  • @preeti97
    @preeti97 6 років тому +5

    Very helpful and good explanation 👍

  • @nafshhhh
    @nafshhhh 6 років тому +4

    Sir ur videos Are very helpful for us....

  • @chenyi-d5j
    @chenyi-d5j Рік тому +1

    thank sooo much! explained so clear for us students.您配享太庙。

  • @Heykidofun
    @Heykidofun 6 років тому +5

    It was clear and clean,thanks a lot sir

  • @defnotdev1
    @defnotdev1 3 роки тому

    I am preparing for the exam. Thank you so much for your lesson.

  • @deekshajain5992
    @deekshajain5992 5 років тому +1

    Great job sir....!! Tqsm for making Daa so simple and easy to understand!

  • @muhammadirtaza5352
    @muhammadirtaza5352 6 років тому +3

    Sir thank you very much for making it understable and easy

  • @SRNR_PODCAST.
    @SRNR_PODCAST. 3 роки тому +1

    a goldmine in youtube

  • @parzival5707
    @parzival5707 3 роки тому

    Thank you so much sir! Made my day.. really was'nt able to find appropriate notes that articulates the main thing which is in fact way easier than rather complicatedly mentioned in regular classses.

  • @mysterylooks1
    @mysterylooks1 Рік тому +2

    Sir can you do a video on Edit Distance and Counting Inversion problems? I love your work and would really want to see these topics covered by you, you're simply magical

  • @vedantkulkarni5437
    @vedantkulkarni5437 2 роки тому

    Clearing my subjects with good marks only because of you and gate smashers 😂🛐

  • @amit_912
    @amit_912 3 роки тому +1

    Teacher of Teachers.

  • @mohdshahalamrayeen4452
    @mohdshahalamrayeen4452 6 років тому +2

    keeping spreading knowledge and love sir.... Thanks for this video course.

  • @roronoazoro6153
    @roronoazoro6153 4 роки тому

    Thank you very much. I don't think anyone could explain it in better words.

  • @cschandragiri
    @cschandragiri 6 років тому +3

    Abdul Sir, you are explaining stuff really well. Can you make videos on Dynamic Programming and how to tackle those problems in top-down and bottom up approach!

  • @EasyRangoliArts
    @EasyRangoliArts 6 років тому +1

    You are the saviour sir😊

  • @Mithilesh165
    @Mithilesh165 6 років тому

    Best ever explanation.....Thanks sir.....😇😇😇😇

  • @sachinsrivathsa
    @sachinsrivathsa 2 роки тому

    Thank you, thank you, thank you, thank you sir. you are a god sent

  • @shantichaturvedi3451
    @shantichaturvedi3451 6 років тому

    thank u so much sir.. you have outstandin way of teaching... finally i cleared on some other Daa topics by your lectures... once again thank you so much

  • @sumitkumar-kh6vs
    @sumitkumar-kh6vs 6 років тому

    sir your teaching style is very nice i am underatanding easily keep it up sir

  • @mohilchitransh8970
    @mohilchitransh8970 2 роки тому

    Thank you sooo much sir .... Just made it very clear ❤❤❤❤❤❤

  • @leonardogoyas4382
    @leonardogoyas4382 3 роки тому

    Thanks, you carried my assignment :D

  • @satya8411
    @satya8411 3 роки тому

    I wish google had a double like or triple like option for ur videos

  • @anishsuman1371
    @anishsuman1371 3 роки тому

    Controlling function is itself the permutation it will use graph only as lookups

  • @jigneshvaidya7472
    @jigneshvaidya7472 5 років тому

    It was really really helpful. Thank you so so so much.
    I loved your teaching techniques sir.
    Keep going.

  • @paulnelapati3890
    @paulnelapati3890 6 років тому +1

    thank you, uni student from syd.

  • @kriegaex
    @kriegaex 4 роки тому +1

    Mr. Bari, I successfully implemented this algorithm in Java for directed graphs, slightly complicated by the fact that Java arrays are 0-based, the algorithm is 1-based though. Anyway, thank you very much. Would you mind telling me the origin of this algorithm, ideally putting a link into the video's description? Is there any scientific paper or other credible source explaining the algorithm? I am trying to get it accepted into a scientific graph library, but that requires an academical source.

  • @ahmedsoliman4015
    @ahmedsoliman4015 6 років тому +2

    Amazing explanation, Thank you!

  • @shashwatagrawal8412
    @shashwatagrawal8412 5 років тому

    Thanks a lot abdul sir . Liked that you explained the written code as well. Pls try and do it for all problems .

  • @Isha_Sethi
    @Isha_Sethi 6 років тому +2

    Very Helpful. Thank you sir

  • @nandhini3117
    @nandhini3117 4 роки тому

    Its really very help full...thank u so much sir

  • @ismailm547
    @ismailm547 3 роки тому

    Thanks for teaching very well with smile face .we understand your teaching..if you please say important semester year qns of daa

  • @kshitijsinghchauhan211
    @kshitijsinghchauhan211 5 років тому

    U r truly a great guy sir, respect

  • @DevendraKumar-kh8li
    @DevendraKumar-kh8li 3 роки тому

    It is very helpful for me 👍👍

  • @hardikdua08
    @hardikdua08 6 років тому

    Very Nicely Explained.Thanks a lot sir....

  • @aayush5474
    @aayush5474 5 років тому +1

    Why we took k

  • @garimasingh7031
    @garimasingh7031 6 років тому

    impressive sir,u'll reach heights sir