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

This commit is contained in:
Grigoris Thanasoulas authored and GitHub committed 2025-06-20 23:05:14 +08:00
1 parent a3a24fc381
commit c176ba378e
1 file changed
+1 -1
+1 -1
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