1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52: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,
// last index of CircularQueue don't contain value, so acturl capacity is capacity - 1
type CircularQueue[T any] struct {
data []T
front int
rear int
capacity int
data []T
front int
rear int
capacity int
}
// NewCircularQueue return a empty CircularQueue pointer

View File

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