面试题02.07 添加cpp双指针新解法

双指针新解法,不需计算链表长度
This commit is contained in:
bin3826246 2022-01-14 19:20:36 +08:00 committed by GitHub
parent cd4529c8ff
commit 570022f666
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ public:
if(pb == nullptr){
pb = headA;
}
//pa == pb时,返回相交起始节点
//pa与pb相等时,返回相交起始节点
if(pa == pb){
return pa;
}