Hmmm if you could pass in by reference then it would be more clearer, just keep tracking the length of each list. My code in C#

public class Solution {
public ListNode AddTwoNumbers(ListNode l1, ListNode l2) {
ListNode head = null;
int len1 = getLen(l1), len2 = getLen(l2);
if (addHelper(l1, len1, l2, len2, ref head) > 0) {
ListNode node = new ListNode(1);
node.next = head;
head = node;
}
return head;
}
private int getLen(ListNode head){
int count = 0;
while(head!=null){
head = head.next;
count++;
}
return count;
}
private int addHelper(ListNode l1, int len1, ListNode l2, int len2, ref ListNode head) {
if (l1==null) { return 0; }
int sum = 0;
if (len1>len2){
sum += l1.val + addHelper(l1.next, len1-1, l2, len2, ref head);
}
else if (len1<len2){
sum += l2.val + addHelper(l1, len1, l2.next, len2-1, ref head);
}
else {
sum += l1.val + l2.val + addHelper(l1.next, len1-1, l2.next, len2-1, ref head);
}
ListNode node = new ListNode(sum%10);
node.next = head;
head = node;
return sum/10;
}
}