seqs

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deque

type Deque[T any] interface {
	Queue[T]
	Stack[T]
}

Deque is a double-ended queue. Values can be added and removed from both the front and back.

type PeekableDeque

type PeekableDeque[T any] interface {
	PeekableQueue[T]
	PeekableStack[T]
}

PeekableDeque is a deque that allows peeking at both the front and back values.

type PeekableQueue

type PeekableQueue[T any] interface {
	Queue[T]

	PeekFront() T // PeekFront returns the value at the front of the queue without removing it.
}

PeekableQueue is a queue that allows peeking at the front value.

type PeekableStack

type PeekableStack[T any] interface {
	Stack[T]

	PeekBack() T // PeekBack returns the value at the back of the stack without removing it.
}

PeekableStack is a stack that allows peeking at the back value.

type Queue

type Queue[T any] interface {
	Empty() bool // Empty returns true if the queue is empty.

	PushBack(value T) // PushBack adds a value to the back of the queue.
	PopFront() T      // PopFront removes and returns the value at the front of the queue.
}

Queue is a first-in-first-out data structure.

type Stack

type Stack[T any] interface {
	Empty() bool // Empty returns true if the stack is empty.

	PushBack(value T) // PushBack adds a value to the back of the stack.
	PopBack()         // PopBack removes the value at the back of the stack.
}

Stack is a last-in-first-out data structure.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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