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();
union.print();
}