合并 k 个排序链表,返回合并后的排序链表.请分析和描述算法的复杂度. 示例: 输入: [ 1->4->5, 1->3->4, 2->6 ] 输出: 1->1->2->3->4->4->5->6 /** * Definition for singly-linked list. * public class ListNode { * public int val; * public ListNode next; * publ…
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: Input: [ 1->4->5, 1->3->4, 2->6 ] Output: 1->1->2->3->4->4->5->6 合并 k 个排序链表,返回合并后的排序链表.请分析和描述算法的复杂度. 示例:…