Java ArrayDeque

Java ArrayDeque is a class that implements the Java Deque interface using a dynamic array, allowing elements to be added and removed from both ends of the queue efficiently. Unlike Java LinkedList, ArrayDeque provides better performance for certain operations, such as offering constant-time access to both ends of the queue. Introduced in Java 2004 with Java 5, ArrayDeque is part of Java's Java Collections Framework and is commonly used in scenarios that require a double-ended queue with high performance.

https://docs.oracle.com/javase/8/docs/api/java/util/ArrayDeque.html