> 其他 >
循环队列的元素个数怎么表示?
人气:173 ℃ 时间:2020-10-02 05:44:57
解答
front为对头指针,rear为对尾指针,n为队列最大元素个数. 队列元素个数=(rear-front 1 n)%n %是求余数
推荐
猜你喜欢
© 2026 79432.Com All Rights Reserved.
电脑版|手机版