If the output array already has some elements in it, then dequeue runs in constant time; otherwise, dequeue takes " O ( n ) " time to add all the elements onto the output array from the input array, where " n " is the current length of the input array.
12.
If the output array already has some elements in it, then dequeue runs in constant time; otherwise, dequeue takes " O ( n ) " time to add all the elements onto the output array from the input array, where " n " is the current length of the input array.
13.
The " queue . enqueue " and " queue . dequeue " methods likely have instructions to update the queue's member variables such as its size, beginning and ending positions, assignment and allocation of queue elements, etc . In addition, the " queue . isEmpty ( ) " and " queue . isFull ( ) " methods read this shared state as well.