分治法两两合并,才没有超时
# Definition for singly-linked list.# class ListNode(object):# def __init__(self, x):# self.val = x# self.next = Noneclass Solution(object): def mergeKLists(self, lists): """ :type lists: List[ListNode] :rtype: ListNode """ if len(lists)==0: return [] return self.merge(lists,0,len(lists)-1) def merge(self,lists,l,r): if l