Question: I am trying to to understand **why Java's ArrayDeque is better than Java's LinkedList** as they both implement Deque interface. 

I hardly see someone using ArrayDeque in their code. If someone sheds more light into how ArrayDeque is implemented, it would be helpful. 

If I understand it, I will be more confident using it. I could not clearly understand the JDK implementation as to the way it manages head and tail references.

Answer: 
[ArrayDeque](https://docs.oracle.com/javase/9/docs/api/java/util/ArrayDeque.html) and [LinkedList](https://docs.oracle.com/javase/9/docs/api/java/util/LinkedList.html) are implementing [Deque](https://docs.oracle.com/javase/9/docs/api/java/util/Deque.html) interface but implementation is different. 

Key differences:

1. The *ArrayDeque* class is the resizable array implementation of the *Deque* interface and *LinkedList* class is the list implementation
2. NULL elements can be added to *LinkedList* but not in *ArrayDeque*
3. *ArrayDeque* is more efficient than the *LinkedList* for add and remove operation at both ends and LinkedList implementation is efficient for removing the current element during the iteration
4. The *LinkedList* implementation consumes more memory than the *ArrayDeque*

So if you don't have to support NULL elements && looking for less memory && efficiency of add/remove elements at both ends, *ArrayDeque* is the best

Refer to [documentation](https://docs.oracle.com/javase/tutorial/collections/implementations/deque.html) for more details.
Time complexity for ArrayDeque for accessing a element is O(1) and that for LinkList is is O(N) to access last element. ArrayDeque is not thread safe so manually synchronization is necessary so that you can access it through multiple threads and so they they are faster.