9) Linked List Cycle II

In this article we going to see about how to Detect Loop in a Linked List and Return the Loop Node. Below is our given problem from Leetcode, Given a linked list, return the node where the cycle begins. If there is no cycle, return null. To represent a cycle in the given linked list, we … Continue reading 9) Linked List Cycle II

8) Detect Loop in linked list

In this article, we going to see how to detect loop in a linked list. Here is our given problem, Given a linked list, determine if it has a cycle in it. To represent a cycle in the given linked list, we use an integer pos which represents the position (0-indexed) in the linked list where tail connects … Continue reading 8) Detect Loop in linked list