mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-06 23:28:29 +08:00
Update
This commit is contained in:
@ -135,7 +135,6 @@
|
||||
* [回溯算法:组合问题再剪剪枝](https://mp.weixin.qq.com/s/Ri7spcJMUmph4c6XjPWXQA)
|
||||
* [回溯算法:求组合总和!](https://mp.weixin.qq.com/s/HX7WW6ixbFZJASkRnCTC3w)
|
||||
* [回溯算法:电话号码的字母组合](https://mp.weixin.qq.com/s/e2ua2cmkE_vpYjM3j6HY0A)
|
||||
* []()
|
||||
|
||||
(持续更新中....)
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
> 找到有没有环已经很不容易了,还要让我找到环的入口?
|
||||
|
||||
# 题目地址
|
||||
https://leetcode-cn.com/problems/linked-list-cycle-ii/
|
||||
|
||||
> 找到有没有环已经很不容易了,还要让我找到环的入口?
|
||||
|
||||
# 第142题.环形链表II
|
||||
|
||||
@ -46,7 +47,7 @@ fast和slow各自再走一步, fast和slow就相遇了
|
||||
动画如下:
|
||||
|
||||
|
||||
<video src='../video/142.环形链表II1.mp4' controls='controls' width='640' height='320' autoplay='autoplay'> Your browser does not support the video tag.</video></div>
|
||||
<img src='../video/141.环形链表.gif' width=600> </img></div>
|
||||
|
||||
|
||||
## 如果有环,如何找到这个环的入口
|
||||
@ -90,7 +91,7 @@ fast指针走过的节点数:` x + y + n (y + z)`,n为fast指针在环内走
|
||||
|
||||
动画如下:
|
||||
|
||||
<video src='../video/142.环形链表II.mp4' controls='controls' width='640' height='320' autoplay='autoplay'> Your browser does not support the video tag.</video></div>
|
||||
<img src='../video/142.环形链表II(求入口).gif' width=600> </img></div>
|
||||
|
||||
|
||||
那么 n如果大于1是什么情况呢,就是fast指针在环形转n圈之后才遇到 slow指针。
|
||||
|
BIN
video/142.环形链表II(求入口).gif
Normal file
BIN
video/142.环形链表II(求入口).gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 MiB |
Reference in New Issue
Block a user