Detect & Remove Loop in Linked List - Approach Discussion + Optimised Implementation

Detect & Remove Loop in Linked List - Approach Discussion + Optimised Implementation

CodeHelp - by Babbar via YouTube Direct link

- Approach #2 - Floyd Cycle Detection

5 of 15

5 of 15

- Approach #2 - Floyd Cycle Detection

Class Central Classrooms beta

YouTube videos curated by Class Central.

Classroom Contents

Detect & Remove Loop in Linked List - Approach Discussion + Optimised Implementation

Automatically move to the next video in the Classroom when playback concludes

  1. 1 - Introduction
  2. 2 - Promotion
  3. 3 - Approach #1 - Detect Cycle
  4. 4 - Code Approach #1 - Detect Cycle
  5. 5 - Approach #2 - Floyd Cycle Detection
  6. 6 - Code Approach #2 - Floyd Cycle Detection
  7. 7 - why this works ?
  8. 8 - Approach #3 - find starting node of Loop
  9. 9 - Proof - why this works ?
  10. 10 - Code Approach #3 - find starting node of Loop
  11. 11 - Approach #4 - Remove Loop from Linked List
  12. 12 - Code Approach #4 - Remove Loop from Linked List
  13. 13 - Merging all Logic - to detect & remove Loop
  14. 14 - Adding NULL Checks
  15. 15 - Homework and Summary

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.