heap

command
v0.0.0-...-11ada09 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: MIT Imports: 1 Imported by: 0

README

heap 堆 是一种特殊的完全二叉树,所有父节点都比子节点小,叫最小堆或小顶堆;所有父节点比子节点大,叫最大堆或大顶堆

对堆插入一个新元素所需要的时间是 O(logN) N为堆节点个数

构造一个N个节点的堆需要的时间复杂度是: O(NlogN)

堆排序时间复杂度 O(NlogN)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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