mirror of
https://github.com/duke-git/lancet.git
synced 2025-12-19 17:02:23 +08:00
arrayqueue: Fix bug in Back() method (#313)
This commit is contained in:
committed by
GitHub
parent
a3a24fc381
commit
c176ba378e
@@ -60,7 +60,7 @@ func (q *ArrayQueue[T]) Front() T {
|
||||
|
||||
// Back return back value of queue
|
||||
func (q *ArrayQueue[T]) Back() T {
|
||||
return q.data[q.size-1]
|
||||
return q.data[q.tail-1]
|
||||
}
|
||||
|
||||
// EnQueue put element into queue
|
||||
|
||||
Reference in New Issue
Block a user