Problem Statment
Given Pointer/Reference to the head of the linked list, the task is to Sort the given linked list using Merge Sort. Note: If the length of linked list is odd, then the extra node should go in the first list while splitting.
Example 1:
Input
N = 5
value[] = {3,5,2,4,1}
Output:
1 2 3 4 5