I have implemented the queue with a circular array If data is a-03570
I have implemented the queue with a circular array. If data is a circular array of CAPACITY elements, and last is an index into that array, what is the formula for the index after last?
This multiple choice question (MCQ) is related to the book/course vu cs301 Data Structures. It can also be found in vu cs301 Mid Term - Quiz No.6.
I have implemented the queue with a circular array. If data is a circular array of CAPACITY elements, and last is an index into that array, what is the formula for the index after last?
(last % 1) + CAPACITY
last % (1 + CAPACITY)
(last + 1) % CAPACITY
last + (1 % CAPACITY)