Documentation
¶
Index ¶
- type CircularQueue
- func (this *CircularQueue[T]) DeQueue() (val T, ok bool)
- func (this *CircularQueue[T]) EnQueue(value T) bool
- func (this *CircularQueue[T]) Front() (val T)
- func (this *CircularQueue[T]) IsEmpty() bool
- func (this *CircularQueue[T]) IsFull() bool
- func (this *CircularQueue[T]) Len() int
- func (this *CircularQueue[T]) Rear() (val T)
- type Queue
- type SimpleQueue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CircularQueue ¶ added in v0.2.8
type CircularQueue[T any] struct { // contains filtered or unexported fields }
Link: https://leetcode.com/problems/design-circular-queue/
func (*CircularQueue[T]) DeQueue ¶ added in v0.2.8
func (this *CircularQueue[T]) DeQueue() (val T, ok bool)
func (*CircularQueue[T]) EnQueue ¶ added in v0.2.8
func (this *CircularQueue[T]) EnQueue(value T) bool
func (*CircularQueue[T]) Front ¶ added in v0.2.8
func (this *CircularQueue[T]) Front() (val T)
func (*CircularQueue[T]) IsEmpty ¶ added in v0.2.8
func (this *CircularQueue[T]) IsEmpty() bool
func (*CircularQueue[T]) IsFull ¶ added in v0.2.8
func (this *CircularQueue[T]) IsFull() bool
func (*CircularQueue[T]) Len ¶ added in v0.2.8
func (this *CircularQueue[T]) Len() int
func (*CircularQueue[T]) Rear ¶ added in v0.2.8
func (this *CircularQueue[T]) Rear() (val T)
type Queue ¶
type Queue[T any] interface { EnQueue(value T) bool DeQueue() (T, bool) Front() T Rear() T IsEmpty() bool IsFull() bool Len() int }
func NewCircularQueue ¶ added in v0.2.8
func NewSimpleQueue ¶ added in v0.2.8
type SimpleQueue ¶ added in v0.2.8
type SimpleQueue[T any] []T
func (*SimpleQueue[T]) DeQueue ¶ added in v0.2.8
func (q *SimpleQueue[T]) DeQueue() (v T, ok bool)
func (*SimpleQueue[T]) EnQueue ¶ added in v0.2.8
func (q *SimpleQueue[T]) EnQueue(v T) bool
func (*SimpleQueue[T]) Front ¶ added in v0.2.8
func (q *SimpleQueue[T]) Front() (v T)
func (*SimpleQueue[T]) IsEmpty ¶ added in v0.2.8
func (q *SimpleQueue[T]) IsEmpty() bool
func (*SimpleQueue[T]) IsFull ¶ added in v0.2.8
func (q *SimpleQueue[T]) IsFull() bool
func (*SimpleQueue[T]) Len ¶ added in v0.2.8
func (q *SimpleQueue[T]) Len() int
func (*SimpleQueue[T]) Rear ¶ added in v0.2.8
func (q *SimpleQueue[T]) Rear() (v T)
Click to show internal directories.
Click to hide internal directories.