代码拉取完成,页面将自动刷新
package deque
type Elem = interface{}
// Deque is a fast double-ended queue.
type Deque interface {
// PushBack adds a new value v at the back of Deque.
PushBack(v Elem)
// PushFront adds a new value v at the front of Deque.
PushFront(v Elem)
// PopBack removes a value from the back of Deque and returns
// the removed value or nil if the Deque is empty.
PopBack() Elem
// PopFront removes a value from the front of Deque and returns
// the removed value or nil if the Deque is empty.
PopFront() Elem
// Back returns the last value of Deque or nil if the Deque is empty.
Back() Elem
// Front returns the first value of Deque or nil if the Deque is empty.
Front() Elem
// Empty returns whether Deque is empty.
Empty() bool
// Len returns the number of values in Deque.
Len() int
// Enqueue is an alias of PushBack.
Enqueue(v Elem)
// Dequeue is an alias of PopFront.
Dequeue() Elem
// DequeueMany removes a number of values from the front of Deque and
// returns the removed values or nil if the Deque is empty.
// If max <= 0, DequeueMany removes and returns all the values in Deque.
DequeueMany(max int) []Elem
// DequeueManyWithBuffer is similar to DequeueMany except that it uses
// buf to store the removed values as long as it has enough space.
DequeueManyWithBuffer(max int, buf []Elem) []Elem
// Range iterates all of the values in Deque.
Range(f func(i int, v Elem) bool)
// Peek returns the value at idx
Peek(idx int) Elem
// Replace replaces the value at idx
Replace(idx int, v Elem)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。