queue

package
v0.0.0-...-5c8b7b9 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: CC0-1.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrQueueEmpty = errors.New("cola vacia")
View Source
var ErrQueueFull = errors.New("cola llena")

Functions

This section is empty.

Types

type ArrayQueue

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

func New

func New(capacity int) ArrayQueue

func (*ArrayQueue) Clear

func (q *ArrayQueue) Clear()

func (*ArrayQueue) Dequeue

func (q *ArrayQueue) Dequeue() (e int, err error)

func (*ArrayQueue) Enqueue

func (q *ArrayQueue) Enqueue(e int) error

func (ArrayQueue) Front

func (q ArrayQueue) Front() (e int, err error)

func (ArrayQueue) Size

func (q ArrayQueue) Size() int

type List

type List interface {
	Clear()    // O(1)
	Size() int // O(1)

	Enqueue(e int) error        // O(1)
	Dequeue(e int) (int, error) // O(1)
	Front() (int, error)        // O(1)
}

Jump to

Keyboard shortcuts

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