leetcode

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2022 License: 0BSD Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeKLists

func MergeKLists(lists []*list.ListNode) *list.ListNode

https://leetcode.com/problems/merge-k-sorted-lists/ power by container/heap.

func MergeKLists2

func MergeKLists2(lists []*list.ListNode) *list.ListNode

power by mergeTwoSortedList.

Types

type ItemHeap

type ItemHeap []*list.ListNode

func (ItemHeap) Len

func (h ItemHeap) Len() int

func (ItemHeap) Less

func (h ItemHeap) Less(i, j int) bool

func (*ItemHeap) Pop

func (h *ItemHeap) Pop() interface{}

func (*ItemHeap) Push

func (h *ItemHeap) Push(x interface{})

func (ItemHeap) Swap

func (h ItemHeap) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL