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
}
MyCircularQueue 结构体
func Constructor ¶
func Constructor(k int) MyCircularQueue
Constructor initialize your data structure here. Set the size of the queue to be k.
func (*MyCircularQueue) DeQueue ¶
func (m *MyCircularQueue) DeQueue() bool
DeQueue delete an element from the circular queue. Return true if the operation is successful.
func (*MyCircularQueue) EnQueue ¶
func (m *MyCircularQueue) EnQueue(value int) bool
EnQueue insert an element into the circular queue. Return true if the operation is successful.
func (*MyCircularQueue) Front ¶
func (m *MyCircularQueue) Front() int
Front get the front item from the queue.
func (*MyCircularQueue) IsEmpty ¶
func (m *MyCircularQueue) IsEmpty() bool
IsEmpty checks whether the circular queue is empty or not. */
func (*MyCircularQueue) IsFull ¶
func (m *MyCircularQueue) IsFull() bool
IsFull checks whether the circular queue is full or not. */
func (*MyCircularQueue) Rear ¶
func (m *MyCircularQueue) Rear() int
Rear get the last item from the queue. */
Click to show internal directories.
Click to hide internal directories.