You are given the heads of two sorted linked lists list1 and list2. Merge the two lists into one sorted list by splicing together the nodes of the first two lists — do not allocate new nodes.
Return the head of the merged list.
Example: list1 = [1,2,4], list2 = [1,3,4] → [1,1,2,3,4,4]. list1 = [], list2 = [] → [].
[1,1,2,3,4,4]