arrayqueue: Fix bug in Back() method (#313)

This commit is contained in:
Grigoris Thanasoulas
2025-06-20 17:05:14 +02:00
committed by GitHub
parent a3a24fc381
commit c176ba378e

View File

@@ -60,7 +60,7 @@ func (q *ArrayQueue[T]) Front() T {
// Back return back value of queue // Back return back value of queue
func (q *ArrayQueue[T]) Back() T { func (q *ArrayQueue[T]) Back() T {
return q.data[q.size-1] return q.data[q.tail-1]
} }
// EnQueue put element into queue // EnQueue put element into queue