0148. Sort List中的middleNode函数边界处理
pench3r opened this issue · comments
Pencher zZ commented
https://github.com/halfrost/LeetCode-Go/blob/master/leetcode/0148.Sort-List/148.%20Sort%20List.go
for p2.Next != nil && p2.Next.Next != nil {
p1 = p1.Next
p2 = p2.Next.Next
}
需要增加边界判断p2.Next != nil.
Pencher zZ commented
僵住了,自己犯了低级错误了。