Open data structures in C++ array based list please Exercise 2.2.Design and implement a RandomQueue.

Open data structures in C++ array based list please Exercise 2.2.Design and implement a RandomQueue. This is an imple-mentation of the Queue interface in which the remove() operationremoves an element that is chosen uniformly at random among all theelements currently in the queue. (Think of a RandomQueue as a bagin which we can add elements or reach in and blindly remove somerandom element.) The add(x) and remove() operations in aRandomQueue should run in con- stant time per operation.
Exercise 2.6.Modify the ArrayDeque implementation so that the shift- ingdone by add(i,x), remove(i), and resize() is done using the fasterSystem.arraycopy(s,i,d,j,n) method. Attached