class Solution(object): def getIntersectionNode(self, headA, headB): cura, curb = headA, headB while cura is not curb: cura = cura.next if cura else headB curb = curb.next if curb else headA return cura
Activity
zqiang3 commentedon Jun 1, 2019