Sort a linked list in O(n log n) time O(1) space.