findkpairswithsmallestsums

package
v0.0.0-...-8653abf Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MinHeap

type MinHeap []Set

func (MinHeap) Empty

func (h MinHeap) Empty() bool

Empty function returns true of empty, false otherwise

func (MinHeap) Len

func (h MinHeap) Len() int

Len function returns the length of MinHeap

func (MinHeap) Less

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

Less function compares the two elements of MinHeap given their indices

func (*MinHeap) Pop

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

Pop function pops the top element of MinHeap

func (*MinHeap) Push

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

Push function pushes the given element into the MinHeap

func (MinHeap) Swap

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

Swap function swaps the values of the elements whose indices are given

func (MinHeap) Top

func (h MinHeap) Top() interface{}

Top function returns the element at the top of the MinHeap

type Set

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

Jump to

Keyboard shortcuts

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