Detection of Loop in a Linked List | GeeksforGeeks

  Рет қаралды 98,383

GeeksforGeeks

GeeksforGeeks

Күн бұрын

Explanation for the article: www.geeksforgeeks.org/write-a-...
Read More: www.geeksforgeeks.org/detect-...
This video is contributed by Pratik Agrawal.

Пікірлер: 22
@acooldryplace00
@acooldryplace00 3 жыл бұрын
Everything GeeksForGeeks creates is coding gold. Thank you for providing subtitles as well.
@selmabelhadj101
@selmabelhadj101 Жыл бұрын
Great explanation. Thanks a lot
@anjalirathore6427
@anjalirathore6427 3 жыл бұрын
Sir in while(slow and fast and fast.next) ... Why we have used 'and' instead of 'or' . Agar slow ya fast me se ek bhi pointer null pe chla gya matlb list end ho gye. Than or likhne pe ku ni chl rha code?
@rahulrawathere
@rahulrawathere 6 жыл бұрын
Fantastic explanation... Thanks a lot
@GeeksforGeeksVideos
@GeeksforGeeksVideos 6 жыл бұрын
Thanks Rahul :)
@CalvinJKu
@CalvinJKu 6 жыл бұрын
How do you find out the start node of the loop using the fast/slow pointer method?
@thelogicalindian2720
@thelogicalindian2720 5 жыл бұрын
it's a loop there is no starting point!
@creativegiant148
@creativegiant148 3 жыл бұрын
Gfg pe ho hii nahi raha same code pe bhi time complexity show kar raha hai
@tejasukalkar2199
@tejasukalkar2199 2 жыл бұрын
can we solve it without hash table?
@MulkRaj101
@MulkRaj101 Жыл бұрын
And thank you for using Dark Mode!
@jatinarora941
@jatinarora941 Жыл бұрын
Fabulus explanation
@vijaypandit6590
@vijaypandit6590 6 жыл бұрын
Hashtable solution works only if a list has unique elements.
@ashieshhh
@ashieshhh 6 жыл бұрын
Not really. They've mentioned they'll store the addresses of the elements not the elements themselves.
@TheBlackDeath3
@TheBlackDeath3 5 жыл бұрын
It only works if the key being stored in the hash table is unique, which an address (presumably referring to a memory address) presumably would be. If two "different" nodes have the same memory address then they're not really two different nodes.
@gibraanjafar1669
@gibraanjafar1669 5 жыл бұрын
@@TheBlackDeath3 two different nodes won't have the same memory address , I think . Correct me if I am wrong .
@engulfing_marubozu
@engulfing_marubozu 3 жыл бұрын
@@gibraanjafar1669 how to make hash table for pointers ? we cant make integer array for doing so
@ashishsinha8893
@ashishsinha8893 7 жыл бұрын
Program to move a node forward n positions plz make videos on this also
@snehabhusare1146
@snehabhusare1146 5 жыл бұрын
Awesome
@matitiudeforever8155
@matitiudeforever8155 6 жыл бұрын
nice explaination but i think in while loop statement writing "while fast.next and fast" would be sufficient......correct me if i am wrong
@dipalisapte9994
@dipalisapte9994 5 жыл бұрын
yes, you are right.
@viralindian8326
@viralindian8326 4 жыл бұрын
Are you god?
@tanmesh2820
@tanmesh2820 Жыл бұрын
bad explaination
Interview Question: Start of Loop in a Linked List
10:37
Gaurav Sen
Рет қаралды 143 М.
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 26 МЛН
Llegó al techo 😱
00:37
Juan De Dios Pantoja
Рет қаралды 60 МЛН
Finding loops/cycles in a linked list
9:26
CodeVault
Рет қаралды 4,2 М.
Largest Sum Contiguous Subarray | GeeksforGeeks
14:06
GeeksforGeeks
Рет қаралды 219 М.
Remove Nodes From Linked List - Leetcode 2487 - Python
13:44
NeetCodeIO
Рет қаралды 10 М.
Check if a linked list is Circular Linked List | GeeksforGeeks
5:41
Detect loop in linked list(floyd algo / Tortoise and hare algo)
9:29
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 111 М.
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 633 М.
Data Structures: Cycles in a Linked List
5:19
HackerRank
Рет қаралды 165 М.
Reverse a Single Linked List
11:57
Neso Academy
Рет қаралды 251 М.