Is it possible to re-use memory in an array-based implementation of a queue without treating the underlying array as circular?
What will be an ideal response?
Yes. If the front of the queue is at subscript 0, and if all array elements are shifted forward when a dequeue
operation occurs, then memory can be re-used. The tradeoff is that the dequeue operation becomes O(n) due to the shifting
of elements.
Computer Science & Information Technology
You might also like to view...
To change the copyright date on a splash screen, you need to open the ____ Information dialog box.
A. Assembly B. ActiveX C. Activity D. Argument
Computer Science & Information Technology
The ________ protocol is used to deliver requested web pages to a computer.
A. HTML B. P2P C. VoIP D. HTTP
Computer Science & Information Technology