Given the head of a linked list, sort it in ascending order.
Follow up: Can you sort it in time and space? Merge sort is ideal for linked lists since you don't need random access.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
Given the head of a linked list, sort it in ascending order.
Follow up: Can you sort it in time and space? Merge sort is ideal for linked lists since you don't need random access.