Skip to content

Commit 32afe48

Browse files
committed
Merge k Sorted Lists
更正时间复杂度
1 parent 3c0b4e6 commit 32afe48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/chapSorting.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ \subsubsection{分析}
9797
\subsubsection{代码}
9898
\begin{Code}
9999
//LeetCode, Merge k Sorted Lists
100-
// 时间复杂度O(n1+n2+...),空间复杂度O(1)
100+
// 时间复杂度O((n1+n2+...)*K),空间复杂度O(1) -- 可利用分治思想,时间复杂度是O(N*logK),空间复杂度是O(K).
101101
class Solution {
102102
public:
103103
ListNode *mergeKLists(vector<ListNode *> &lists) {

0 commit comments

Comments
 (0)