gg_collections

package
v0.2.53 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

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

Queue is a basic FIFO queue based on a circular list that resizes as needed.

func NewQueue

func NewQueue(initialSize int) *Queue

func (*Queue) Count

func (instance *Queue) Count() int

func (*Queue) Pop

func (instance *Queue) Pop() interface{}

Pop removes and returns a node from the queue in first to last order.

func (*Queue) Push

func (instance *Queue) Push(value interface{})

Push adds a node to the queue.

type Stack

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

Stack is a basic LIFO stack that resizes as needed.

func NewStack

func NewStack(initialSize int) *Stack

func (*Stack) Count

func (instance *Stack) Count() int

func (*Stack) Pop

func (instance *Stack) Pop() interface{}

Pop removes and returns an item from the stack in last to first order.

func (*Stack) Push

func (instance *Stack) Push(value interface{})

Push adds an item to the stack.

Jump to

Keyboard shortcuts

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