Skip to content

Commit 064f90f

Browse files
authored
Update 23. 合并K个升序链表.java
1 parent bd90489 commit 064f90f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

题目汇总/23. 合并K个升序链表.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ public ListNode mergeKLists(ListNode[] lists) {
172172
head = head.next;
173173
}
174174

175-
head.next = null;
175+
head.next = null; // 因为堆排是不稳定的,所以会导致可能出现环circle
176176

177177
return dummyHead.next;
178178
}
179-
}
179+
}

0 commit comments

Comments
 (0)