摘要:
合并两个有序链表: 法一:迭代 package main func mergeTwoLists(list1 *ListNode, list2 *ListNode) *ListNode { dummyHead := &ListNode{} cursor := dummyHead for list1 ! 阅读全文
摘要:
type minHeap []*ListNode func (h minHeap) Len() int { return len(h) } func (h minHeap) Less(i, j int) bool { return h[i].Val < h[j].Val } func (h minH 阅读全文