Description
ArrayDeque
This class is likely to be faster than Stack when used as a stack, and faster than LinkedList when used as a queue.
.. not to mention less memory fragmentation (single backing array v.s. many ArrayList nodes).
https://docs.oracle.com/javase/8/docs/api/java/util/ArrayDeque.html