_81_300

package
v0.0.0-...-54ead48 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MedianFinder

type MedianFinder struct {
	// contains filtered or unexported fields
}

func Constructor

func Constructor() MedianFinder

func (*MedianFinder) AddNum

func (m *MedianFinder) AddNum(num int)

对顶堆:左半部分用大根堆存储,右半部分用小根堆存储。求中位数直接比较两个堆的个数和堆顶

func (*MedianFinder) FindMedian

func (m *MedianFinder) FindMedian() float64

Jump to

Keyboard shortcuts

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