Practice Problem
Sort List
Difficulty: Medium
Given the head of a linked list, sort it in ascending order using O(n log n) time and O(1) or O(log n) space.
Practice Problem
Difficulty: Medium
Given the head of a linked list, sort it in ascending order using O(n log n) time and O(1) or O(log n) space.