|
21 | 21 | <p> </p>
|
22 | 22 |
|
23 | 23 | <p><strong>Example 1:</strong></p>
|
24 | | -<a href="https://assets.leetcode.com/uploads/2018/12/13/160_example_1.png" target="_blank"><img alt="" src="https://assets.leetcode.com/uploads/2018/12/13/160_example_1.png" style="margin-top: 10px; margin-bottom: 10px; width: 400px; height: 130px;" /></a> |
| 24 | +<a href="https://assets.leetcode.com/uploads/2020/06/29/160_example_1_1.png" target="_blank"><img alt="" src="https://assets.leetcode.com/uploads/2020/06/29/160_example_1_1.png" style="margin-top: 10px; margin-bottom: 10px; width: 400px; height: 130px;" /></a> |
25 | 25 |
|
26 | 26 | <pre>
|
27 | | -<strong>Input: </strong>intersectVal = 8, listA = [4,1,8,4,5], listB = [5,0,1,8,4,5], skipA = 2, skipB = 3 |
| 27 | +<strong>Input: </strong>intersectVal = 8, listA = [4,1,8,4,5], listB = [5,6,1,8,4,5], skipA = 2, skipB = 3 |
28 | 28 | <strong>Output:</strong> Reference of the node with value = 8
|
29 | | -<strong>Input Explanation:</strong> The intersected node's value is 8 (note that this must not be 0 if the two lists intersect). From the head of A, it reads as [4,1,8,4,5]. From the head of B, it reads as [5,0,1,8,4,5]. There are 2 nodes before the intersected node in A; There are 3 nodes before the intersected node in B.</pre> |
| 29 | +<strong>Input Explanation:</strong> The intersected node's value is 8 (note that this must not be 0 if the two lists intersect). From the head of A, it reads as [4,1,8,4,5]. From the head of B, it reads as [5,6,1,8,4,5]. There are 2 nodes before the intersected node in A; There are 3 nodes before the intersected node in B.</pre> |
30 | 30 |
|
31 | 31 | <p> </p>
|
32 | 32 |
|
33 | 33 | <p><strong>Example 2:</strong></p>
|
34 | | -<a href="https://assets.leetcode.com/uploads/2018年12月13日/160_example_2.png" target="_blank"><img alt="" src="https://assets.leetcode.com/uploads/2018年12月13日/160_example_2.png" style="margin-top: 10px; margin-bottom: 10px; width: 350px; height: 136px;" /></a> |
| 34 | +<a href="https://assets.leetcode.com/uploads/2020年06月29日/160_example_2.png" target="_blank"><img alt="" src="https://assets.leetcode.com/uploads/2020年06月29日/160_example_2.png" style="margin-top: 10px; margin-bottom: 10px; width: 350px; height: 136px;" /></a> |
35 | 35 |
|
36 | 36 | <pre>
|
37 | | -<strong>Input: </strong>intersectVal = 2, listA = [0,9,1,2,4], listB = [3,2,4], skipA = 3, skipB = 1 |
| 37 | +<strong>Input: </strong>intersectVal = 2, listA = [1,9,1,2,4], listB = [3,2,4], skipA = 3, skipB = 1 |
38 | 38 | <strong>Output:</strong> Reference of the node with value = 2
|
39 | | -<strong>Input Explanation:</strong> The intersected node's value is 2 (note that this must not be 0 if the two lists intersect). From the head of A, it reads as [0,9,1,2,4]. From the head of B, it reads as [3,2,4]. There are 3 nodes before the intersected node in A; There are 1 node before the intersected node in B. |
| 39 | +<strong>Input Explanation:</strong> The intersected node's value is 2 (note that this must not be 0 if the two lists intersect). From the head of A, it reads as [1,9,1,2,4]. From the head of B, it reads as [3,2,4]. There are 3 nodes before the intersected node in A; There are 1 node before the intersected node in B. |
40 | 40 | </pre>
|
41 | 41 |
|
42 | 42 | <p> </p>
|
|
59 | 59 | <li>If the two linked lists have no intersection at all, return <code>null</code>.</li>
|
60 | 60 | <li>The linked lists must retain their original structure after the function returns.</li>
|
61 | 61 | <li>You may assume there are no cycles anywhere in the entire linked structure.</li>
|
| 62 | + <li>Each value on each linked list is in the range <code>[1, 10^9]</code>.</li> |
62 | 63 | <li>Your code should preferably run in O(n) time and use only O(1) memory.</li>
|
63 | 64 | </ul>
|
64 | 65 |
|
|
0 commit comments