142. Linked List Cycle IIMedium
Given the
headof a linked list, return the node where the cycle begins. If there is no cycle, returnnull.There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the
nextpointer. Internally,posis used to denote the index of the node that tail'snextpointer is connected to (0-indexed). It is-1if there is no cycle. Note thatposis not passed as a parameter.Do not modify the linked list.
- Problem
- Solutions