class Solution:
def getIntersectionNode(self, headA: ListNode, headB: ListNode) -> ListNode:
if not headA or not headB:return None
p1
Leetcode52 两个链表的第一个相交节点
![](https://img-home.csdnimg.cn/images/20240711042549.png)
class Solution:
def getIntersectionNode(self, headA: ListNode, headB: ListNode) -> ListNode:
if not headA or not headB:return None
p1