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.
Click to show internal directories.
Click to hide internal directories.