The algorithm I used is pretty straightforward:

if len_a < len_b, b will go forward (len_b - len_a) nodes and then a and b start to go forward together until they meet together or to the tail node (return null).

but I got a runtime error which I don't know why. Any suggestions?

```
class Solution:
# @param two ListNodes
# @return the intersected ListNode
def getIntersectionNode(self, headA, headB):
if headA is None or headB is None:
return None
lena= self.listlen(headA)
lenb= self.listlen(headB)
if lenb < lena: (headA, headB) = (headB, headA)
delta = lenb - lena
for i in range(delta):
headB = headB.next
while True:
if headA is None or headB is None:
return None
if headA==headB:
return headA
headA = headA.next
headB = headB.next
def listlen(self, ahead):
if ahead is None:
return 0
return 1 + self.listlen(ahead.next)
```