Mergesort Linkedlist
Given the head of a linked list, return the list after sorting it in increasing order.Input Format
Time Complexity : O(nlogn)
Space Complexity : constant space
1->7->2->6->3->5->4->nullOutput Format
1->2->3->4->5->6->7->nullQuestion Video
0 <= N <= 10^6Sample Input
4Sample Output
0
6
7
5
0 5 6 7
-
Asked in Companies
-
Related Topics
Video Solution
Code Solution
{ }
{ }
Run