SIGN IN SIGN UP
krahets / hello-algo UNCLAIMED

《Hello 算法》:动画图解、一键运行的数据结构与算法教程。支持简中、繁中、English、日本語,提供 Python, Java, C++, C, C#, JS, Go, Swift, Rust, Ruby, Kotlin, TS, Dart 等代码实现

0 0 33 Other

Fix confusion between queSize and rear pointer in ArrayQueue implementation (#1851)

- `queSize` represents the queue's size, not the rear pointer position.
- In `pop`, `queSize--` decreases the size, not the rear pointer.
- The rear pointer is calculated using modulo (`%`) with the `front` and `queSize` to avoid confusion.

Co-authored-by: Chance Luo <247349913+chanceluo1618-bot@users.noreply.github.com>
K
Kunchen-Luo committed
c2eb1dbc5a9997e683f8b1d89dbabc4e470afa51
Parent: 6251b8e
Committed by GitHub <noreply@github.com> on 3/30/2026, 6:46:56 AM