mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-04 15:01:40 +08:00
更新国内版力扣题目描述变更
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
<p>Given a circular linked list, implement an algorithm that returns the node at the beginning of the loop.</p>
|
||||
|
||||
<p>Circular linked list: A (corrupt) linked list in which a node's next pointer points to an earlier node, so as to make a loop in the linked list.</p>
|
||||
|
||||
<p><strong>Example 1: </strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input: </strong>head = [3,2,0,-4], pos = 1
|
||||
<strong>Output: </strong>tail connects to node index 1</pre>
|
||||
|
||||
<p><strong>Example 2: </strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input: </strong>head = [1,2], pos = 0
|
||||
<strong>Output: </strong>tail connects to node index 0</pre>
|
||||
|
||||
<p><strong>Example 3: </strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input: </strong>head = [1], pos = -1
|
||||
<strong>Output: </strong>no cycle</pre>
|
||||
|
||||
<p><strong>Follow Up: </strong><br />
|
||||
Can you solve it without using additional space?</p>
|
||||
<p>Given a circular linked list, implement an algorithm that returns the node at the beginning of the loop.</p>
|
||||
|
||||
|
||||
|
||||
<p>Circular linked list: A (corrupt) linked list in which a node's next pointer points to an earlier node, so as to make a loop in the linked list.</p>
|
||||
|
||||
|
||||
|
||||
<p><strong>Example 1: </strong></p>
|
||||
|
||||
|
||||
|
||||
<pre>
|
||||
|
||||
<strong>Input: </strong>head = [3,2,0,-4], pos = 1
|
||||
|
||||
<strong>Output: </strong>tail connects to node index 1</pre>
|
||||
|
||||
|
||||
|
||||
<p><strong>Example 2: </strong></p>
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user