This commit is contained in:
2026-01-20 19:49:23 -05:00
parent 15160f6451
commit afa3b30e98

View File

@@ -38,7 +38,7 @@ func (l ListNodeHeap) Swap(i int, j int) {
l[i], l[j] = l[j], l[i] l[i], l[j] = l[j], l[i]
} }
func mergeKLists(lists []*ListNode) *ListNode { func MergeKLists(lists []*ListNode) *ListNode {
hp := ListNodeHeap(lists) hp := ListNodeHeap(lists)
heap.Init(&hp) heap.Init(&hp)