Question: PLEASE DON'T CREATE ANY NEW NODES OR LIST OBJECTS . The problem specifically tells that. Implement a generic method that, given the head node of

PLEASE DON'T CREATE ANY NEW NODES OR LIST OBJECTS. The problem specifically tells that.
Implement a generic method that, given the head node of a singly linked list L, splits it into two singly linked lists Lodd and Leven and returns the head nodes of Lodd and Leven in a length-2 array. All the elements at odd positions in the original list need to go into Lodd and, similarly, all the elements at even positions in the original list need to go into Leven. Your method may traverse the original list only once. You are not allowed to create any nodes or list objects. While we refer to lists L,Lodd and Leven here, the method should not use any list objects; only node sequences
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
