4 ms·
In Java, I've never seen a linked list implementation outperform the stock implementation of an array-backed deque for stacks or queues. http://docs.oracle.com
by Adrock 15y ago
In Java, I've never seen a linked list implementation outperform the stock implementation of an array-backed deque for stacks or queues.
http://docs.oracle.com/javase/6/docs/api/java/util/ArrayDeque.html http://docs.oracle.com/javase/6/docs/api/java/util/ArrayDequ...
I highly recommend that every Java developer read the source for this class (and the rest of the java.util Collections).