Split Linked List in alternating way
Problem Given a singly linked list, split it into two linked lists. These linked lists will contain the alternate nodes from the given linked list. Examples Example 1: head = [1,2,3,4,5] Output: [ [1, 3, 5], [2, 4] ] ...