Runtime

Queue Interface#

QueueofferpeekpollremovesizeData Structure
PriorityQueueO(log n)O(1)O(log n)O(n)O(1)Priority Heap
LinkedListO(1)O(1)O(1)O(1)O(1)Array
ArrayDequeueO(1)O(1)O(1)O(n)O(1)Linked List
ConcurrentLinkedQueueO(1)O(1)O(1)O(n)O(n)Linked List
ArrayBlockingQueueO(1)O(1)O(1)O(n)O(1)Array
PriorirityBlockingQueueO(log n)O(1)O(log n)O(n)O(1)Priority Heap
SynchronousQueueO(1)O(1)O(1)O(n)O(1)None!
DelayQueueO(log n)O(1)O(log n)O(n)O(1)Priority Heap
LinkedBlockingQueueO(1)O(1)O(1)O(n)O(1)Linked List

Deque/Dequeue Interface#

Dequeoffer/offerLastpeekpoll/pollLastremove/removeLastSizeData Structure
LinkedListO(1)O(1)O(1)O(1)O(1)Array
ArrayDequeueO(1)O(1)O(1)O(n)O(1)Linked List