queues back front front back count figure the circular array when the queue is first created in the constructor into the position immediately following the back marker but rememberwe are using circular array and once the marker reaches the last element of the actual linear arrayit must wrap around to the first element this can be done using condition statement to test if back is referencing the last element and adjusting it appropriatelyas shown hereself _back + if self _back =lenself _qarray self _back simpler approach is to use the modulus operator as part of the increment step this reduces the need for the conditional and automatically wraps the marker to the beginning of the array as followsself _back self _back lenself _qarray the dequeue operation is implemented in similar fashion as enqueue(as shown in lines - of listing the item to be removed is taken from the position marked by front and saved the marker is then advanced using the modulus operator as was done when enqueueing new item the counter is decremented and the saved item is returned run time analysis the circular array implementation provides more efficient solution than the python list the operations all have worst case time-complexity of ( since the array items never have to be shifted but the circular array does introduce the drawback of working with maximum-capacity queue even with this limitationit is well suited for some applications using linked list major disadvantage in using python list to implement the queue adt is the expense of the enqueue and dequeue operations the circular array implementation improved on these operationsbut at the cost of limiting the size of the queue better solution is to use linked list consisting of both head and tail references adding the tail reference allows for quick append operations that otherwise would