p0622

package
v0.0.0-...-9d9ab22 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MyCircularQueue

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

func Constructor

func Constructor(k int) MyCircularQueue

* Initialize your data structure here. Set the size of the queue to be k.

func (*MyCircularQueue) DeQueue

func (this *MyCircularQueue) DeQueue() bool

* Delete an element from the circular queue. Return true if the operation is successful.

func (*MyCircularQueue) EnQueue

func (this *MyCircularQueue) EnQueue(value int) bool

* Insert an element into the circular queue. Return true if the operation is successful.

func (*MyCircularQueue) Front

func (this *MyCircularQueue) Front() int

* Get the front item from the queue.

func (*MyCircularQueue) IsEmpty

func (this *MyCircularQueue) IsEmpty() bool

* Checks whether the circular queue is empty or not.

func (*MyCircularQueue) IsFull

func (this *MyCircularQueue) IsFull() bool

* Checks whether the circular queue is full or not.

func (*MyCircularQueue) Rear

func (this *MyCircularQueue) Rear() int

* Get the last item from the queue.

Jump to

Keyboard shortcuts

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