p0641

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: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MyCircularDeque

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

func Constructor

func Constructor(k int) MyCircularDeque

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

func (*MyCircularDeque) DeleteFront

func (this *MyCircularDeque) DeleteFront() bool

* Deletes an item from the front of Deque. Return true if the operation is successful.

func (*MyCircularDeque) DeleteLast

func (this *MyCircularDeque) DeleteLast() bool

* Deletes an item from the rear of Deque. Return true if the operation is successful.

func (*MyCircularDeque) GetFront

func (this *MyCircularDeque) GetFront() int

* Get the front item from the deque.

func (*MyCircularDeque) GetRear

func (this *MyCircularDeque) GetRear() int

* Get the last item from the deque.

func (*MyCircularDeque) InsertFront

func (this *MyCircularDeque) InsertFront(value int) bool

* Adds an item at the front of Deque. Return true if the operation is successful.

func (*MyCircularDeque) InsertLast

func (this *MyCircularDeque) InsertLast(value int) bool

* Adds an item at the rear of Deque. Return true if the operation is successful.

func (*MyCircularDeque) IsEmpty

func (this *MyCircularDeque) IsEmpty() bool

* Checks whether the circular deque is empty or not.

func (*MyCircularDeque) IsFull

func (this *MyCircularDeque) IsFull() bool

* Checks whether the circular deque is full or not.

Jump to

Keyboard shortcuts

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