p0023

package
v0.0.0-...-4302f07 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2019 License: MIT Imports: 1 Imported by: 0

README

两种方法

  1. 类似归并排序,两两合并

  2. 维护一个堆,每次取堆顶合并

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hp

type Hp []*ListNode

func (Hp) Len

func (h Hp) Len() int

func (Hp) Less

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

func (*Hp) Pop

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

func (*Hp) Push

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

func (Hp) Swap

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

type ListNode

type ListNode struct {
	Val  int
	Next *ListNode
}

Jump to

Keyboard shortcuts

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