mirror of
https://github.com/krahets/hello-algo.git
synced 2025-12-19 07:17:54 +08:00
Unify the function naming of
queue from `offer()` to `push()`
This commit is contained in:
@@ -32,8 +32,8 @@ func (q *arrayQueue) isEmpty() bool {
|
||||
return q.queSize == 0
|
||||
}
|
||||
|
||||
// offer 入队
|
||||
func (q *arrayQueue) offer(num int) {
|
||||
// push 入队
|
||||
func (q *arrayQueue) push(num int) {
|
||||
// 当 rear == queCapacity 表示队列已满
|
||||
if q.queSize == q.queCapacity {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user