FindTop10NumbersAnswer

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NumPartFile = uint64(100)
)
View Source
var TopHeap = &ItemHeap{}

Functions

func GenerateBigFile

func GenerateBigFile(Row uint64)

func GetPartTop10

func GetPartTop10()

GetPartTop10 get the top 10 numbers in each partition files and push them into TopHeap GetPartTop10 获取每个小文件中的 top 10,并把它们加入 TopHeap 中

func GetTop10

func GetTop10() []uint64

GetTop10 get the real top 10 and return the slice containing them GetTop10 获取真正的 top 10,并返回包含它们的切片

func RemoveAndClosePartFile

func RemoveAndClosePartFile()

func SplitBigFile

func SplitBigFile(NumPartFile uint64)

SplitBigFile split the source file into partition files SplitBigFile 将源文件分割到多个小文件中

Types

type Item

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

type ItemHeap

type ItemHeap []Item

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(val 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
⌂ 换网址