structures

package
v0.0.0-...-b30106d Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 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 {
	*list.List
}

Queue - Custom List type

func NewQueue

func NewQueue() *Queue

NewQueue - Create a new queue

func (*Queue) Dequeue

func (q *Queue) Dequeue() interface{}

Dequeue - Remove the first item from the queue

func (*Queue) Enqueue

func (q *Queue) Enqueue(value interface{})

Enqueue - Used to add new item to the end of the queue

func (*Queue) Front

func (q *Queue) Front() interface{}

Front - Peak the first item of the queue without removing it

func (*Queue) Len

func (q *Queue) Len() int

Len - Get the no of items currently in the list

Jump to

Keyboard shortcuts

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