queue

package
v0.0.0-...-ad7117f Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListQueue

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

ListQueue - It's a queue with linked lists dawg

func NewListQueue

func NewListQueue(dataType interface{}) (q *ListQueue)

func (ListQueue) End

func (q ListQueue) End() *Node

End Get the last node in the queue

func (ListQueue) Length

func (q ListQueue) Length() int

Length Length of the queue

func (ListQueue) Peek

func (q ListQueue) Peek() (node *Node)

Peek Look at value on bottom of the queue

func (*ListQueue) Pop

func (q *ListQueue) Pop() (node *Node)

Pop Take the top value from bottom of the queue

func (*ListQueue) Push

func (q *ListQueue) Push(data ...interface{}) *Node

Push Push data to top of the queue

func (*ListQueue) Remove

func (q *ListQueue) Remove(index int) (node *Node)

Remove Remove value at index of the queue

func (ListQueue) Start

func (q ListQueue) Start() *Node

Start Get the first node in the queue

func (ListQueue) String

func (q ListQueue) String() string

type Node

type Node struct {
	Data interface{}
	// contains filtered or unexported fields
}

func (Node) String

func (n Node) String() string

Jump to

Keyboard shortcuts

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