import adt.LinkedList;
public class Q027_Union_and_Intersection_of_two_Linked_Lists {
public static void main(String[] args) {
LinkedList a = new LinkedList(new int[]{10, 15, 4, 20});
LinkedList b = new LinkedList(new int[]{8, 4, 2, 10});
ListNode intersection = getIntersection(a.head, b.head);
ListNode union = getUnion(a.head, b.head);
intersection.print();