Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 题意:对k个有序的链表进行归并排序.并分析其复杂度. /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(N…
problem: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Tags Divide and Conquer Linked List Heap 合并K个已序单链表 thinking: (1)题目没有要求不能够新开ListNode,所以暴力破解法:提取K个list的keyword.排序.新建结点插入.这样的情况对原list是否排好序没有要求. 排…