Add python code of chapter queue to docs.

This commit is contained in:
Yudong Jin
2022-12-02 00:09:34 +08:00
parent 460d42ae3d
commit e20bc251f5
18 changed files with 276 additions and 134 deletions

View File

@@ -56,7 +56,7 @@ func (q *ArrayQueue) Poll() any {
return nil
}
v := q.data[q.head]
// 队头指针向后移动越过尾部返回到数组头部
// 队头指针向后移动一位,若越过尾部返回到数组头部
q.head = (q.head + 1) % q.capacity
return v
}