Hackerrank Java Dequeue Solution
In computer science, a double-ended queue (dequeue, often abbreviated to deque, pronounced deck) is an abstract data type that generalizes a queue, for which elements can be added to or removed from either the front (head) or back (tail).
Deque interfaces can be implemented using various types of collections such