Circular queue array, please comment beside code
the Queue array implementation could be improved to eliminateshuffling if we treated the array as if it werecircular, so that when you try to add an item pastthe end, you insert it at the start instead.
Produce a modified version of QueueArray.javacalled something such as QueueCircularArray.java.This will involve keeping track of the current head and tail andallowing them to increase continuously as items areenqueued/dequeued. These head and tail positions are ‘virtual’array indices, from which actual indices are computed using modulararithmetic. You also will have to change how ‘isEmpty’ and ‘isFull’operate. When testing, make sure to
PayPal Gateway not configured
PayPal Gateway not configured