Detect & Remove Cycle in a Linked List | Floyd's Cycle Detection Algorithm | DSA-One Course #39

Sdílet
Vložit
  • čas přidán 7. 09. 2021
  • Hey guys, In this video, We're going to learn Floyd's cycle Detection Algorithm. This algorithm is used to detect and remove cycle in a Linked List.
    Code: www.geeksforgeeks.org/detect-...
    🥳 Join our Telegram Community:
    Telegram channel: telegram.me/realanujbhaiya
    Telegram group: telegram.me/dsa_one
    🚀 Follow me on:
    Instagram: / anuj.kumar.sharma
    Linkedin: / sharma-kumar-anuj
    Twitter: / realanujbhaiya
    💸 Use coupon code ANUJBHAIYA on GeeksforGeeks to avail discounts on courses!
    📚 Complete DSA Playlist: • DSA-One Course - The C...
    Complete Android Development Playlist: • Android Development Tu...
    Hashtags:
    #anujbhaiya #dsaone
    Ignore these tags:
    detect
    detect lying
    detect lyin
    dust detect
    detect lies
    detect movie
    detect tempo
    detect fakes
    detect liars
    dyson v15 detect
    detect short film
    detect short movie
    how to detect liars
    dewalt power detect
    dyson v12 detect slim
    how to detect baloney
    how to detect deception
    detect independent film
    detect telugu short film
    how to detect dark matter
    dyson v15 detect inceleme
    detect the honest officer
    how to detect counterfeit
    linked list
    linked list in c
    linked list conept
    linked lists
    linked list in hindi
    linked list in python
    linked list examples
    linked list in c programming
    c programming for beginners
    beginners
    c tutorial for beginners
    stock market for beginners
    sql for beginners
    beginner
    beginner chinese
    it beginner course
    beginner in coding
    apis for beginners
    investing for beginners
    beginner sewing tips
    sql beginners
    beginner ds algo
    c programming for begineers

Komentáře • 296

  • @ruchitachandel2348
    @ruchitachandel2348 Před 2 lety +57

    I really like those who taught concepts in Hindi. Becz being an Indian jitne clarity Hindi me aate hai utne English me kabhi nahi aate. English me sirf concept samagh aata hai or Hindi me concept ghus jaata hai.. Thanks for making such a good content.

  • @nimishnandwana1085
    @nimishnandwana1085 Před 2 lety +7

    Your dry run technique is the best bro.

  • @danishuddin9752
    @danishuddin9752 Před 2 lety +4

    just wow! thank you very much for making DSA easy comfortable and lovable!

  • @naiduaravind4641
    @naiduaravind4641 Před 2 lety +1

    Thank you very much brother, I am in lot of confusion with this "linked list cycle check". Your video helped me to understand in a better way and the way of teaching is simply amazzzzzzing.

  • @preranaramteke5908
    @preranaramteke5908 Před 2 lety +3

    Thanks Anuj Bhaiya,For Making DSA Easy to Learn

  • @DipsOfficial802
    @DipsOfficial802 Před 9 měsíci +2

    Thank u Anuj Bhaiya

  • @khudkikhoz
    @khudkikhoz Před 2 lety +2

    Sukriya bhai 😍 itna regular ho kr toh padh b nahi paate jitna regularly videos aa rhe h, Tx for ur time bhai.

  • @BRSanush
    @BRSanush Před 2 lety +1

    Crystal Clear Explaination!
    Thank you so much...

  • @swethakare429
    @swethakare429 Před 2 lety +1

    Easy to understand..very nice I am following all ur lectures...!!!

  • @sanketgoel6453
    @sanketgoel6453 Před rokem +4

    this dsa-algo course is really helpful , if possible create more videos like this to solve the classical question of dsa

  • @manishkumargupta8677
    @manishkumargupta8677 Před 2 lety +1

    Aisi explaination with proof mai pahli baar dekh raha hun
    Thank you very much bhaiya

  • @debasishphukon5345
    @debasishphukon5345 Před 2 lety +1

    Very Nice Explanation,
    For removing the loop, we can put a condition in the while loop without maintaining another pointer
    while(start->next != meet->next)
    {
    start = start->next;
    meet=meet->next;
    }
    meet->next = NULL;
    This is should remove the loop

  • @AshutoshKumar-gc1sy
    @AshutoshKumar-gc1sy Před 2 lety +1

    this is the best teacher for dsa on youtube i am sure...

  • @cliffmathew
    @cliffmathew Před rokem

    Thank you. You have done a great job explaining this. Many other videos I saw (mostly in English) does not do a good job of explaining why the start of the cycle node will be the meeting point after the slow pointer is reset back to start of the list.

  • @mohammedsayeed4876
    @mohammedsayeed4876 Před 2 lety +1

    What a mind blowing and easy explanation

  • @pranjalnama2420
    @pranjalnama2420 Před rokem +2

    thank you so much sir i was struggling to understand the second proof but you made it clear. ❤

  • @tejaslomate9214
    @tejaslomate9214 Před rokem +2

    yes, it is very helpful sir..

  • @gpavansai7207
    @gpavansai7207 Před rokem

    Thank You Anuj Bhaiya, now I am clear with Floyd's Cycle Detection Algorithm. :)

  • @arshadahmed4951
    @arshadahmed4951 Před rokem +1

    👍 YES, IT WAS HELPFUL. THANKYOU SO MUCH FOR SHARING YOUR KNOWLEDGE WITH US. 🙏🙏🔥🔥🔥

  • @everymaterialforstudy4893

    Thank you sir your teaching method is amazing its really helpful to understand the concept of
    dsa

  • @abhijeetmohapatra808
    @abhijeetmohapatra808 Před 2 lety +1

    Yes, This was helpful ❤️

  • @anujchoubey2453
    @anujchoubey2453 Před 2 lety +1

    Wonderful explanation 👏

  • @iti_koookie9678
    @iti_koookie9678 Před rokem +3

    Thank you so much It was so helpful...
    Just keep going 👍

  • @s.g.prajapati3597
    @s.g.prajapati3597 Před 2 lety +2

    The idea was helpful!

  • @ravikumar4870
    @ravikumar4870 Před rokem

    YES, IT WAS HELPFUL. THANKYOU SO MUCH FOR SHARING YOUR KNOWLEDGE WITH US.

  • @mritunjay7065
    @mritunjay7065 Před 2 lety

    Simple and best explanation !

  • @ankursahu7704
    @ankursahu7704 Před 2 lety

    As always It was helpful. Thanks for the explanation :)

  • @srishtychoudhary7750
    @srishtychoudhary7750 Před rokem

    yes, it was helpful. Great Explanation

  • @shabbirk
    @shabbirk Před 2 lety

    That was a fantastic explanation!

  • @kartikkusmude9008
    @kartikkusmude9008 Před rokem +1

    Best explanation for this question

  • @shivamchouhan8426
    @shivamchouhan8426 Před 2 lety

    your explain's skill really good , i got this linked list problem .Thanks keep contniue.

  • @sakshi07222
    @sakshi07222 Před rokem +1

    Best explanation ever got for this problem

  • @nitinanand1092
    @nitinanand1092 Před rokem +1

    thx bhaiya ur great and here is my solution to remove cycle :-
    public static void removeCycle(Node node, Node head) {
    LinkedList_copied list = new LinkedList_copied();
    if(node == null || node.next == null) {
    return;
    }
    Node curr = head;
    Node ptr = node;
    Node prev = null;
    while(curr != ptr) {
    prev = ptr;
    ptr = ptr.next;
    curr = curr.next;
    }
    prev.next = null;
    }

  • @infinity2arbitrary681
    @infinity2arbitrary681 Před 2 lety +2

    It was really very helpful thanks 👍

  • @shivamjha464
    @shivamjha464 Před 2 lety

    Finally understood, thanks!

  • @adinathkolhapure6697
    @adinathkolhapure6697 Před 2 lety

    YES, It was helpful.💖

  • @cricketind8830
    @cricketind8830 Před 2 lety +2

    Yes, very helpful

  • @amitkumarlkr
    @amitkumarlkr Před 2 lety +2

    Great 😃 explanation thank you 😊

  • @anuragchatterjee241
    @anuragchatterjee241 Před 2 lety +3

    awesome explanation bhaiya 😀

  • @shivamgupta-ch8kw
    @shivamgupta-ch8kw Před rokem +1

    Best explaination on the youtube...Thank you bhaiyaaaaaa

  • @glorioustrex5234
    @glorioustrex5234 Před 2 lety

    Yes it was helpful, thankyou

  • @ashutoshkumar7276
    @ashutoshkumar7276 Před 2 lety

    Proof was amazing, thanks

  • @abhinavchetan9575
    @abhinavchetan9575 Před 2 lety

    Very niceee keep up the great work👍👍

  • @mindbehaviour9195
    @mindbehaviour9195 Před rokem

    Maja aa gaya bhai, best video on linkedlist

  • @moshoyab4964
    @moshoyab4964 Před 2 lety

    Bhaiya ye course complete kerna bht acha course h very useful h or thoda jaldi jaldi videos dalo awesome course h ♥️♥️♥️

  • @sn8.f
    @sn8.f Před rokem

    This is awesome!
    Thank you so much

  • @BhaktiPath-gk6fo
    @BhaktiPath-gk6fo Před rokem

    Best Video in CZcams till date.

  • @kishandwivedi2444
    @kishandwivedi2444 Před 2 lety

    Tagda explanation bhaiya ji
    Bs isi trh aur saare problems ki vdo daalte rho

  • @kartikking7
    @kartikking7 Před 2 lety

    Yes ,it was helpful!

  • @ramankr0022
    @ramankr0022 Před 11 měsíci

    extremely helpful. thanks.

  • @sakshumpandey3859
    @sakshumpandey3859 Před 2 lety +1

    yes sir it was very much helpful

  • @atharvshelgaonkar4694
    @atharvshelgaonkar4694 Před 2 lety +2

    Yes video was helpful 😃

  • @onlyPROFIT_BITCOIN
    @onlyPROFIT_BITCOIN Před 2 lety +1

    Yes it was helpful 😇

  • @shivamKumar-pv7gz
    @shivamKumar-pv7gz Před 2 lety +1

    Wonderful explanation bahiya

  • @chetantailor3620
    @chetantailor3620 Před 2 lety +2

    very helpful.

  • @eddiepulaski237
    @eddiepulaski237 Před rokem

    Yes, It was very very helpful

  • @yashjadhav6838
    @yashjadhav6838 Před 2 lety +1

    Jod! explanation

  • @good114
    @good114 Před rokem +1

    Thank you Sir💕❤️❤️💕

  • @levi-lb6dp
    @levi-lb6dp Před 2 lety +2

    Thanks ❤️

  • @blackwolfkills
    @blackwolfkills Před 2 lety

    Great explaination

  • @shaikaqib3496
    @shaikaqib3496 Před 2 lety +1

    YES, IT WAS HELPFUL

  • @ThisAmit
    @ThisAmit Před 9 měsíci

    Yes it was helpful. Thank you.

  • @noormaaz
    @noormaaz Před 2 lety

    Big Yes! Apne naya sekha diya

  • @kondurisaivarshath686
    @kondurisaivarshath686 Před 2 měsíci

    YES,IT WAS HELPFUL TQ Anuj Bhaiya

  • @furqanahmad5446
    @furqanahmad5446 Před rokem

    very helpful.. thank u bhaiya

  • @shubhamraj5500
    @shubhamraj5500 Před 2 lety

    YES, It was helpful

  • @Atul_Agnihotri
    @Atul_Agnihotri Před 10 měsíci

    Yes, It was helpful.

  • @anupchaudhary4253
    @anupchaudhary4253 Před rokem

    Great explanation ❤

  • @divyadwivedi2018
    @divyadwivedi2018 Před 2 lety

    helpful, Thanks a lot 😀

  • @QniqueTales
    @QniqueTales Před 2 lety +1

    it is helpfull bhaiya

  • @Kunalkekaram
    @Kunalkekaram Před 9 dny

    bhaiya kya tagda dry run krke smjhaya hai mja hi aagya

  • @mohdumar6990
    @mohdumar6990 Před 2 lety

    bhot bdiya mzaa aagya bhaiya

  • @satyam2921
    @satyam2921 Před 2 lety

    Thanks for the video

  • @arifsaleem-7377
    @arifsaleem-7377 Před 5 měsíci

    wonderful explanation

  • @rohan8758
    @rohan8758 Před 6 měsíci

    Nice explanation Anuj Bhaiyan ji

  • @roopeshverma9719
    @roopeshverma9719 Před 5 měsíci

    Thanks sir, the proof was the simplest explaination ever!

  • @vrindasharma4035
    @vrindasharma4035 Před 2 lety

    it was very helpful bhaiyaa!

  • @ritikarai1232
    @ritikarai1232 Před 2 lety +1

    Yes it was helpful

  • @priyanshugupta5198
    @priyanshugupta5198 Před 2 lety

    yes! it was helpful bhaiya thank u so much

  • @aryansinha1818
    @aryansinha1818 Před 2 lety

    Bahut se bhi uppppar helpful

  • @JiGLifyy
    @JiGLifyy Před 2 lety +2

    Really helping video bhiya...keep uploading...placement season is going on . (tier 3 cllg )😅

  • @onemansvoice4256
    @onemansvoice4256 Před 2 lety

    Yes, it was helpful

  • @akhilballa8320
    @akhilballa8320 Před rokem

    Veryy much helpful bro...thank you 🙇🙇

  • @abdulsattarghanghro2856

    your are just superb sir!😘

  • @Mahendra-Singh-048
    @Mahendra-Singh-048 Před rokem

    yes, it was helpful.

  • @arshadkhan-vl5kh
    @arshadkhan-vl5kh Před rokem

    yes !! it was helpful.

  • @sairamdonthula7827
    @sairamdonthula7827 Před 2 lety

    Next level 👌

  • @maheshmirje5657
    @maheshmirje5657 Před 11 měsíci

    Yes it was helpful!!

  • @user-ds4ym3hs4e
    @user-ds4ym3hs4e Před 7 měsíci

    Next level 💯 👌 bhai (bro) , I just love the way how you proved that. Literally great 👍 explanation 👏

  • @Sandeep_Kumar2022
    @Sandeep_Kumar2022 Před 4 měsíci

    Yes, helpful video ❤❤

  • @ravikantmaurya1979
    @ravikantmaurya1979 Před 2 lety

    I saw your first video and you got a subscriber....

  • @cricbollysci6191
    @cricbollysci6191 Před 2 lety

    really helpful...

  • @subhamadhikari
    @subhamadhikari Před rokem

    Thank you brother!

  • @Ak-in5cu
    @Ak-in5cu Před 2 lety

    bhaiya yaar matlab maza hi aa gya

  • @jainikprajapati1632
    @jainikprajapati1632 Před 2 lety

    Thank you
    Yes very helpful

  • @VijayPal-rx1nb
    @VijayPal-rx1nb Před 2 lety

    Sirra ❤️❤️
    It is helpful bhaiya ❤️

  • @arshadjaved8136
    @arshadjaved8136 Před 2 lety +8

    Please add more interview questions cover all dsa topics as fast as possible..I am following from ur course java for placements .I am unable to find This type of teaching . Please add more videos fast my placements are running in my clg🙏🙏..and thanks so much for ur contribution ❤️❤️

    • @Hrit
      @Hrit Před 2 lety

      Exactly this series is one of the best on youtube

  • @memerengineer8758
    @memerengineer8758 Před 2 lety

    Thank you bhaiyea!

  • @workwithmohiit
    @workwithmohiit Před 7 měsíci

    Yes it was helpful sir

  • @KaranBulani
    @KaranBulani Před 9 měsíci

    Amazing explanation