Sort a Linked List Using Merge Sort
Given the head pointer of a linked list, sort the linked list in ascending order using merge sort and return the new head pointer of the sorted linked list.
We'll cover the following
Statement
Merge sort is one of the standard sorting algorithms for a linked list. If the given linked list is , then the sorted (in ascending order) list should be .
Example
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.