Given the heads of two sorted singly linked lists, combine their existing nodes into one sorted list.
Return the head of the merged list. Each node has the shape { val, next }.
Inputlist1 = [1, 2, 4], list2 = [1, 3, 4]
Output[1, 1, 2, 3, 4, 4]
Taking the smaller available node from the two lists places both 1s first, then 2, 3, and both 4s.
Inputlist1 = [], list2 = []
Output[]
Both lists are empty, so there are no nodes to merge.
0 ≤ total number of nodes ≤ 100