hashtables

package
v0.0.0-...-a3e585e Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainingHashTable

type ChainingHashTable[T comparable] struct {
	// contains filtered or unexported fields
}

func NewChainingHT

func NewChainingHT[T comparable]() *ChainingHashTable[T]

func (*ChainingHashTable[T]) Add

func (ht *ChainingHashTable[T]) Add(k string, v T)

func (*ChainingHashTable[T]) Del

func (ht *ChainingHashTable[T]) Del(k string) (T, error)

func (*ChainingHashTable[T]) Get

func (ht *ChainingHashTable[T]) Get(k string) (T, error)

func (*ChainingHashTable[T]) LoadFactor

func (ht *ChainingHashTable[T]) LoadFactor() float32

func (*ChainingHashTable[T]) Print

func (ht *ChainingHashTable[T]) Print()

type HashTable

type HashTable[T comparable] interface {
	Add(k string, v T)
	Get(k string) (T, error)
	Del(k string) (T, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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