Implementing an expandable queueI have been asked to build an expandable queue. I wrote queue.cpp, a circular array, I need to make it expandable, that is it doubles when number of queue elements exceeds the capacity of queue. Please make any changes on the cpp in the attached pdf, not on the header file. Changes to be made in comparison with header file, queue.h. To implement such a queue, I will need to use a dynamic array to hold all queue elements. Any time the capacity is doubled, a new, larger dynamic array is created and is used to replace the current array. Make sure to implement the three non-move methods of the Big-5 for the queue class to avoid memory errors as initialized in the header. I need to make sure the enqueue() and dequeue() operation is O(1) on average—the queue only expands when its capacity reaches the limit. Not allowed to use any STL containers in the implementation.
Cheap Essay essays are NOT intended to be forwarded as finalized work as it is only strictly meant to be used for research and study purposes. Cheap Essay does not endorse or condone any type of plagiarism.