Skip to content

Commit 0e1a5f6

Browse files
authored
Explain.md
1 parent e28fa37 commit 0e1a5f6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## 這題解法是網路上的解法,這邊只是用來解釋
2+
3+
這個解法是一個對一個比較
4+
流程如下:
5+
6+
7+
headA : 4 1 8 4 5 null 5 0 1 8 4 5
8+
| | | | | | | | | | | |
9+
| | | | | | | | | | | |
10+
headB : 5 0 1 8 4 5 null 4 1 8 4 5
11+
12+
這時候會發現,他們第一次intersection的node不是"1"嗎?
13+
為甚麼答案是"8"呢?
14+
用gdb看一下

0 commit comments

Comments
 (0)