queue

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PriorityQueue

type PriorityQueue interface {
	Enqueue(element any, priority int) (ok bool)
	Dequeue() (element any, ok bool)
	Peek() (element any, ok bool)
	Empty() bool
	Full() bool
	Size() int
}

func NewPriorityQueue

func NewPriorityQueue(capacity int) (q PriorityQueue, err error)

type Queue

type Queue interface {
	Enqueue(element any) (ok bool)
	Dequeue() (element any, ok bool)
	Peek() (element any, ok bool)
	Empty() bool
	Full() bool
}

func NewLoopQueue

func NewLoopQueue(capacity int) (q Queue, err error)

func NewQueue

func NewQueue(capacity int) Queue

Jump to

Keyboard shortcuts

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