public static void main(String[] args) { AddTwoNumbers test = new AddTwoNumbers(); ListNode l1 = test.new ListNode(5); ListNode l2 = test.new ListNode(5); test.addTwoNumbers(l1, l2); }
public static void main(String[] args) { int arr1[] = {2, 4, 3}; int arr2[] = {5, 6, 7}; ListNode a = createListFromArray(arr1); ListNode b = createListFromArray(arr2); AddTwoNumbers atn = new AddTwoNumbers(); ListNode sum = atn.addTwoNumbers(a, b); showList(sum); }