Ask Question
11 February, 12:45

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. 11 February, 12:50
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers