Problem
Given thehead of a linked list, return the list after sorting it in ascending order.
Examples
Constraints
- The number of nodes in the list is in the range [0, 5 * 10^4].
- -10^5 <= Node.val <= 10^5
O(n logn) time and O(1) memory (i.e. constant space)?