(LinkedListNode l)
| 3 | |
| 4 | public class QuestionB { |
| 5 | private static int length(LinkedListNode l) { |
| 6 | if (l == null) { |
| 7 | return 0; |
| 8 | } else { |
| 9 | return 1 + length(l.next); |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | private static PartialSum addListsHelper(LinkedListNode l1, LinkedListNode l2) { |
| 14 | if (l1 == null && l2 == null) { |