mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 08:50:15 +08:00
面试题02.07 添加cpp双指针新解法
双指针新解法,不需计算链表长度
This commit is contained in:
@ -28,7 +28,7 @@ public:
|
||||
if(pb == nullptr){
|
||||
pb = headA;
|
||||
}
|
||||
//pa == pb时,返回相交起始节点
|
||||
//pa与pb相等时,返回相交起始节点
|
||||
if(pa == pb){
|
||||
return pa;
|
||||
}
|
||||
|
Reference in New Issue
Block a user