Medium · Linked Lists · about 25 minutes
Asked at Meta, Google, Bloomberg, Amazon, Microsoft.
Rearrange a linked list into ascending order and return the new head, in O(n log n) time.