You are given the heads of two sorted linked lists list1 and list2.
Merge the two lists into one sorted list. The merged list should be made by splicing together the nodes of the two given lists.
Return the head of the merged linked list.
list1: 1 -> 2 -> 4 -> null list2: 1 -> 3 -> 4 -> null
Input: list1 = [1, 2, 4], list2 = [1, 3, 4] Output: [1, 1, 2, 3, 4, 4] Explanation: Both lists are sorted; weaving their nodes together in order produces the merged sorted list.
Input: list1 = [], list2 = [] Output: [] Explanation: Merging two empty lists produces an empty list.
list1 = [1, 2, 4], list2 = [1, 3, 4]