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

preview_player
Показать описание
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.

🥳 Join our Telegram Community:

🚀 Follow me on:

💸 Use coupon code ANUJBHAIYA on GeeksforGeeks to avail discounts on courses!

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
Рекомендации по теме
Комментарии
Автор

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.

ruchitachandel
Автор

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

debasishphukon
Автор

Your dry run technique is the best bro.

nimishnandwana
Автор

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

danishuddin
Автор

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

manishkumargupta
Автор

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

khudkikhoz
Автор

Crystal Clear Explaination!
Thank you so much...

BRSanush
Автор

Best explanation ever got for this problem

sakshi
Автор

Thanks Anuj Bhaiya, For Making DSA Easy to Learn

preranaramteke
Автор

Best explaination on the youtube...Thank you

shivamgupta-chkw
Автор

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;
}

nitinanand
Автор

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.

cliffmathew
Автор

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

gpavansai
Автор

It was simply awesome and crystal clear..

RohitKumar-nbqe
Автор

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 ❤️❤️

arshadjaved
Автор

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

iti_koookie
Автор

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

sanketgoel
Автор

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

pranjalnama
Автор

bhaiya kya tagda dry run krke smjhaya hai mja hi aagya

Kunalkekaram
Автор

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

swethakare