skew

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: GPL-3.0 Imports: 1 Imported by: 0

README

Skew Priority Queue

Implementation Notes

Nodes contain the following:

  • A key k, where k ∈ ℝ
  • A pointer to a value
  • A pointer to the left node
  • A pointer to the right node

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tree

type Tree[K cmp.Ordered, V any] struct {
	// contains filtered or unexported fields
}

func FindMin

func FindMin[K cmp.Ordered, V any](t *Tree[K, V]) *Tree[K, V]

func Insert

func Insert[K cmp.Ordered, V any](t *Tree[K, V], new *Tree[K, V]) *Tree[K, V]

func Meld

func Meld[K cmp.Ordered, V any](a, b *Tree[K, V]) *Tree[K, V]

func NewTree

func NewTree[K cmp.Ordered, V any](key K, value V) *Tree[K, V]

func RemoveMin

func RemoveMin[K cmp.Ordered, V any](t *Tree[K, V]) *Tree[K, V]

func (*Tree[K, V]) Key

func (t *Tree[K, V]) Key() K

func (*Tree[K, V]) Value

func (t *Tree[K, V]) Value() V

Jump to

Keyboard shortcuts

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