chapter10

package
v0.0.0-...-2a29fd4 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2015 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApproximateSort

func ApproximateSort(in []int, k int) []int

func ClosestToMedian

func ClosestToMedian(a []int, k int) []int

func CompareKthLargestInHeap

func CompareKthLargestInHeap(heap []int, k, x int) int

func KThLargestElement

func KThLargestElement(stream []int, k int) []int

func MergeSortedArrays

func MergeSortedArrays(arrs [][]int) []int

func OnlineMedian

func OnlineMedian(s []int) []float64

func OnlineMedianHelper

func OnlineMedianHelper(a []int) (common.IntHeap, common.IntHeap, []float64)

func SortKIncreasingDecreasingArray

func SortKIncreasingDecreasingArray(arr []int) []int

Types

type Pair

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

type PairHeap

type PairHeap []Pair

func (PairHeap) Len

func (h PairHeap) Len() int

func (PairHeap) Less

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

func (*PairHeap) Pop

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

func (*PairHeap) Push

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

func (PairHeap) Swap

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

Jump to

Keyboard shortcuts

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