Leetcode-Question-23: Merge K Sorted Lists

原文链接:
https://leetcode.com/problems/merge-k-sorted-lists/

题目描述:
23. Merge k Sorted Lists
Difficulty: Hard

Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.

解析:

或者,加上一个假的链表头:

 

发表评论

电子邮件地址不会被公开。 必填项已用*标注