to look at array minimization techniques as wellit could be that after several invocations of the resizing algorithm and various mutations on the deque later that we have an array taking up considerable amount of memory yet we are only using few small percentage of that memory an algorithm described would also be (nyet its invocation would be harder to gauge strategically to bypass all the aforementioned issues deque typically uses doubly linked list as its baking data structure while node that has two pointers consumes more memory than its array item counterpart it makes redundant the need for expensive resizing algorithms as the data structure increases in size dynamically with language that targets garbage collected virtual machine memory reclamation is an opaque process as the nodes that are no longer referenced become unreachable and are thus marked for collection upon the next invocation of the garbage collection algorithm with +or any other language that uses explicit memory allocation and deallocation it will be up to the programmer to decide when the memory that stores the object can be freed summary with normal queues we have seen that those who arrive first are dealt with firstthat is they are dealt with in first-in-first-out (fifoorder queues can be ever so usefulfor example the windows cpu scheduler uses different queue for each priority of process to determine which should be the next process to utilise the cpu for specified time quantum normal queues have constant insertion and deletion run times searching queue is fairly unusual--typically you are only interested in the item at the front of the queue despite thatsearching is usually exposed on queues and typically the run time is linear in this we have also seen priority queues where those at the front of the queue have the highest priority and those near the back have the lowest one implementation of priority queue is to use heap data structure as its backing storeso the run times for insertiondeletionand searching are the same as those for heap (defined in ss queues are very natural data structureand while they are fairly primitive they can make many problems lot simpler for example the breadth first search defined in ss makes extensive use of queues