public void alternateSplit(Node head) { if (null == head || null == head.next) return; Node current = head.next.next; Node head1 = head; Node head2 = head.next; head1.next = null; head2.next = null; boolean first = true; while (current != null) { if (first) { Node temp = current.next; current.next = null; head1 = Push.pushNode(head1, current); first = false; current = temp; } else { Node temp = current.next; current.next = null; head2 = Push.pushNode(head2, current); first = true; current = temp; } } head1 = ReverseListIterative.reverse(head1); head2 = ReverseListIterative.reverse(head2); System.out.println("List1: "); PrintLinkedList.print(head1); System.out.println(); System.out.println("List2: "); PrintLinkedList.print(head2); }