Documentation ¶
Index ¶
- type MyCircularDeque
- func (this *MyCircularDeque) DeleteFront() bool
- func (this *MyCircularDeque) DeleteLast() bool
- func (this *MyCircularDeque) GetFront() int
- func (this *MyCircularDeque) GetRear() int
- func (this *MyCircularDeque) InsertFront(value int) bool
- func (this *MyCircularDeque) InsertLast(value int) bool
- func (this *MyCircularDeque) IsEmpty() bool
- func (this *MyCircularDeque) IsFull() bool
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.
Click to show internal directories.
Click to hide internal directories.