container_demo

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 3 Imported by: 0

README

container

Golang容器数据类型包含:heaplistring三种。

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UseList

func UseList()

func UseRing

func UseRing()

Types

type IntHeap

type IntHeap []int

int heap 使用heap需要实现heap.Interface接口的5个方法(Pop/Push以及从Sort继承的Len/Less/Swap方法)

func (IntHeap) Len

func (h IntHeap) Len() int

func (IntHeap) Less

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

func (*IntHeap) Pop

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

func (*IntHeap) Push

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

func (IntHeap) Swap

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

Jump to

Keyboard shortcuts

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