Problem Description: Given a Linked list, find out whether it contains a loop or not. If it does, then remove the loop and make the last node point to NULL.
In a linked list, a loop is encountered when the last node points to any node in the linked list instead of pointing to NULL.
For eg:
To solve this problem, we need to follow these 2 steps:
Detecting whether a loop is present or not.
Removing the loop.
Detecting a loop in Linked List :
The fastest method to detect a loop in a linked list ...
Published on November 09, 2020 03:57