-->
当前位置:首页 > 题库 > 正文内容

Multiple choice:Let the subscript range of the array in the circular queue be 0-n-1, and its head and tail pointers are f and R respectively. The head pointer f always points to the head element of the queue, and the tail pointer r always points to the ne

Luz3年前 (2021-05-10)题库256
Let the subscript range of the array in the circular queue be 0-n-1, and its head and tail pointers are f and R respectively. The head pointer f always points to the head element of the queue, and the tail pointer r always points to the next position of the tail element of the queue. Then the condition for the queue to be full is()@[ A](2)
A. (r+1)%n==f
B. r==f
C. r+1==f
D. (r-l)%n==f




A.(r+1)%n==f
B.r==f
C.r+1==f
D.(r-l)%n==f


answer:A

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。