Remove Loop from Linked List | C++ | Java | Python

  Рет қаралды 9,010

Ayushi Sharma

Ayushi Sharma

Күн бұрын

Watch in 1.25X speed for better experience😁
Time Stamps :
0:00 Problem discussion
01:48 Optimized Approach
07:44 Why this approach works?
12:40 Code explanation
Time Complexity : O(N)
Space Complexity : O(1)
Detect Loop in Linked List : • Detect Loop in Linked ...
Problem Link : practice.geeksforgeeks.org/pr...
C++ Code Link : github.com/Ayu-99/Love-Babbar...
Python Code Link: github.com/Ayu-99/Love-Babbar...
Java Code Link : github.com/Ayu-99/Love-Babbar...
Love Babbar DSA Sheet : drive.google.com/file/d/1FMdN...
Please like, share and subscribe if you found the video useful. Feel free to ask in comments section if you have any doubts. :)
#DataStructuresAndAlgorithms
#LoveBabbarDSASheet
#interviewpreparation
Remove Loop from Linked List solution
Remove Loop from Linked List Leetcode
Remove Loop from Linked List C++
Join telegram channel for more updates on placement preparation : t.me/AyushiSharmaDiscussionGroup
Checkout the series: 🔥🔥🔥
👉 Array: kzfaq.info?list...
👉 Linked List : kzfaq.info?list...
👉 Recursion : kzfaq.info?list...
👉 Stack and Queue : kzfaq.info?list...
👉 Greedy :kzfaq.info?list...
👉 Dynamic Programming :kzfaq.info?list...
👉 Leetcode contests : kzfaq.info?list...
👉 Leetcode June Challenge : kzfaq.info?list...
👉 Leetcode July Challenge : kzfaq.info?list...
LIKE | SHARE | SUBSCRIBE 🔥🔥😊

Пікірлер: 44
@vijayalakshmiv3567
@vijayalakshmiv3567 2 жыл бұрын
Wow.This is the best explanation.Everyone explains the code and how to do it.But no one explained how it works.Thankyou so much for such an awesome explanation.
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thank you so much Ruchi🥺😊 glad it was helpful
@yuvrajagarkar8942
@yuvrajagarkar8942 Жыл бұрын
Please continue making such quality content, i loved the way you explained 'how' & 'why' the logic works in certain case, most creators don't do a good job explaining the 'why' part !!! keep up 👍
@AyushiSharmaDSA
@AyushiSharmaDSA Жыл бұрын
Thank you so much Yuvraj, means a lot 🤗
@adityan5302
@adityan5302 8 ай бұрын
Just loved the explanation!!! Hat's offff
@AyushiSharmaDSA
@AyushiSharmaDSA 7 ай бұрын
thank you Adityan :)
@piyushparadkar6290
@piyushparadkar6290 2 жыл бұрын
wow ! Nice explaination......
@deepankurgupta569
@deepankurgupta569 2 жыл бұрын
great explanation about the distance of the meeting point of the pointers.👍
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thank you Deepankur, glad it was helpful :)
@mayankpatidar9176
@mayankpatidar9176 2 жыл бұрын
The way you teach.. Is another level mam... I saw your all video of coding ninja... Your teaching is next level and your voice is so so so smooth.
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thank you so much Mayank, means a lot :)
@gowrimanohari6682
@gowrimanohari6682 Жыл бұрын
best explanation!
@paragdas9485
@paragdas9485 2 жыл бұрын
Quality teaching. I appreciate.
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thanks Parag, means a lot :)
@saiavinashduddupudi8975
@saiavinashduddupudi8975 Жыл бұрын
Beautiful explanation of the mathematical proof at 12:16
@AyushiSharmaDSA
@AyushiSharmaDSA Жыл бұрын
Thanks 😊
@AmarjeetKumar-to9ub
@AmarjeetKumar-to9ub Жыл бұрын
Thank You :)
@InderjeetSingh-eb8py
@InderjeetSingh-eb8py 2 жыл бұрын
Very well explained👌
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thank you :)
@showsshorts4696
@showsshorts4696 Жыл бұрын
thankyou mam
@HARIHARAKRA
@HARIHARAKRA Жыл бұрын
Plz post video regularly..you are sweet btw
@desihiphop4998
@desihiphop4998 2 жыл бұрын
Di top knotch explanation 🔥🔥
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thank you, glad it was helpful :)
@nknidhi321
@nknidhi321 2 жыл бұрын
Thanks Ayushi
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Welcome Nidhi :)
@thalap_74-
@thalap_74- 3 ай бұрын
@ecs185_shaileshbharti3
@ecs185_shaileshbharti3 2 жыл бұрын
💯👍✨
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thank you :)
@ajit287
@ajit287 2 жыл бұрын
Nice Thumbnail...
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thanks :)
@BrainyiFY_o0
@BrainyiFY_o0 Жыл бұрын
Python code showing type error How to deal with it
@saiavinashduddupudi8975
@saiavinashduddupudi8975 Жыл бұрын
First step to deal with it is let us know the error log here :p
@abhimanyusingh5562
@abhimanyusingh5562 2 жыл бұрын
time limit exceeding
@sanchitkanojia5460
@sanchitkanojia5460 2 жыл бұрын
Di in your telegram group only you will msg please allow us so we will put our doubts in this group
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
okay sanchit, thanks for letting me know😀
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Let me know if you are still not able to msg
@sanchitkanojia5460
@sanchitkanojia5460 2 жыл бұрын
@@AyushiSharmaDSA now the members of the group are able to put the msg. Thank you so much Di😊😊
@FaisalKhan-ek5zy
@FaisalKhan-ek5zy Жыл бұрын
Ab to pehle Like krta hu , Fir Video start krta hu.. 😅
@AyushiSharmaDSA
@AyushiSharmaDSA Жыл бұрын
thanks yrr Faisal 🤗😇🥺
@Sonu-tg6tg
@Sonu-tg6tg 2 жыл бұрын
Please explain code in java as well
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Okay, will do from next video✌🏻
@Sonu-tg6tg
@Sonu-tg6tg 2 жыл бұрын
@@AyushiSharmaDSA thanks
@ASIFAlI-lq4rd
@ASIFAlI-lq4rd 11 ай бұрын
LEETCODE SOLUTION FOR GIVEN PROBLEM. class Solution { static Node slow; public static Node detectLoop(Node head){ slow = head; Node fast = head; while(fast != null && fast.next != null){ slow = slow.next; fast = fast.next.next; if(fast == slow){ return slow; } } return null; } public static void removeLoop(Node head){ Node fast = detectLoop(head); if(slow == fast){ slow = head; if(slow == fast){ while(fast.next != slow) fast = fast.next; }else{ while(slow.next != fast.next){ slow = slow.next; fast = fast.next; } } fast.next = null; } } }
Flattening a Linked List 🔥🔥| Recursion
15:31
Ayushi Sharma
Рет қаралды 4,9 М.
Spot The Fake Animal For $10,000
00:40
MrBeast
Рет қаралды 195 МЛН
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 8 МЛН
No empty
00:35
Mamasoboliha
Рет қаралды 10 МЛН
L14. Detect a loop or cycle in LinkedList | With proof and Intuition
20:26
Remove Loop in Linked List | Java | Interview Question | GeeksForGeeks
17:44
Opensource, Uncensored, Unbothered. - Flux.1 Image Gen
18:59
MattVidPro AI
Рет қаралды 16 М.
Flattening a Linked List | Linked List | Important |Love Babbar DSA Sheet | Amazon | Google🔥
12:04
L6. Odd Even Linked List | Multiple Approaches
24:05
take U forward
Рет қаралды 72 М.
Spot The Fake Animal For $10,000
00:40
MrBeast
Рет қаралды 195 МЛН