In the array implementation of the queue, if the number of elements used drops to 25% of the capacity, why can’t we immediately just reduce the capacity to one half?
A. There may be too many elements in the queue.
B. The queue may be wrapping around the array.
C. It would be faster to make some element adjustments first.
D. If the array is reduced to one-half its capacity, there may be memory leak for some of the elements.
B
You might also like to view...
Write a PL/SQL block to print all odd numbers between 1 and 10 using a basic loop.
What will be an ideal response?
The selection sort algorithm can recognize whether or not the list is already sorted at the beginning.
Answer the following statement true (T) or false (F)
An older type of serial interface connector.
What will be an ideal response?
The Task Scheduler is a utility that enables you to create a task and select the best time for it to run and how often to run it
Indicate whether the statement is true or false