1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-17 03:02:28 +08:00

fmt: gofmt package datastructure/queue

This commit is contained in:
dudaodong
2022-06-08 14:40:37 +08:00
parent 2c0ab9e922
commit 38a7f9423f
2 changed files with 4 additions and 5 deletions

View File

@@ -9,10 +9,10 @@ import (
// CircularQueue implements circular queue with slice, // CircularQueue implements circular queue with slice,
// last index of CircularQueue don't contain value, so acturl capacity is capacity - 1 // last index of CircularQueue don't contain value, so acturl capacity is capacity - 1
type CircularQueue[T any] struct { type CircularQueue[T any] struct {
data []T data []T
front int front int
rear int rear int
capacity int capacity int
} }
// NewCircularQueue return a empty CircularQueue pointer // NewCircularQueue return a empty CircularQueue pointer

View File

@@ -42,7 +42,6 @@ func (q *LinkedQueue[T]) IsEmpty() bool {
return q.length == 0 return q.length == 0
} }
// Enqueue put element into queue // Enqueue put element into queue
func (q *LinkedQueue[T]) Enqueue(value T) { func (q *LinkedQueue[T]) Enqueue(value T) {
newNode := datastructure.NewQueueNode(value) newNode := datastructure.NewQueueNode(value)