class Solution:
def mergeKLists(self, lists: List[ListNode]) -> ListNode:
if not lists:
return None
new_li = ListNode(0)
p = new_li
node_li = []
for li in lists:
while li:
node_li.append(li.val)
li = li.next
node_li.sort()
for node in node_li:
p.next = ListNode(node)
p = p.next
return new_li.next
08-22
08-22
08-22
06-09