Closed
Description
Given the head of a linked list, return the list after sorting it in ascending order.
Solution:
A divide and conquer algorithm similar to merge sort used in case of arrays. The linked list is recursively broken down to smaller lists and then sorted after which they are merged, thereby sorting the original linked list.
Metadata
Metadata
Assignees
Labels
No labels