Code:
import java.util.*;
public class Adding2LinkedListsTest {
public static void main(String[] args) {
// Add your code here to testAdd2LinkedLists method
}
public static LinkedList<Integer> add2LinkedLists(LinkedList<Integer> llist1, LinkedList<Integer>llist2){
// Add your code here to return thesum of 2 linked list. For example,
// llist1: 3 -> 1 -> 5 andllist2: 5 -> 9 -> 2. Return: 8 -> 0 -> 8
}
}
[1.5 mark] You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in
OR
OR