Ask Question
28 February, 23:52

In an array based implementationof a queue a possible solution to dealing with the full condition is to

A. All other answers

B. Check for frontIndex equal to backIndex

C. wait for an arrayFullException to be thrown

D. Maintain a count of queue items

+5
Answers (1)
  1. 1 March, 03:27
    0
    D. Maintain a count of queue items.

    Explanation:

    For checking the full condition of a queue you have to check whether the number of elements in the array are equal to the size of the array. If they are equal then we can that the queue is full.

    Checking frontindex equal to backindex is for checking if the queue is empty.

    In option C we have to check for arrayFullException but it will not be a good approach.

    So we conclude by saying that the answer is option D.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “In an array based implementationof a queue a possible solution to dealing with the full condition is to A. All other answers B. Check for ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers