adt

package
v0.0.0-...-b1ea630 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeakableReader

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

func NewPeakableReader

func NewPeakableReader(reader *bufio.Reader) *PeakableReader

func (*PeakableReader) PeekRune

func (pb *PeakableReader) PeekRune() (rune, error)

func (*PeakableReader) PopRune

func (pb *PeakableReader) PopRune() (rune, error)

type Queue

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

func NewQueue

func NewQueue() *Queue

NewQueue creates a new Queue

func (*Queue) Dequeue

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

Dequeue removes and returns the item at the front of the queue

func (*Queue) Enqueue

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

Enqueue adds an item to the end of the queue

func (*Queue) IsEmpty

func (q *Queue) IsEmpty() bool

func (*Queue) Peek

func (q *Queue) Peek() (interface{}, error)

func (*Queue) Size

func (q *Queue) Size() int

Size returns the number of items in the queue

Jump to

Keyboard shortcuts

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