Hackerrank Deque-STL Solution
Double ended queue or Deque(part of C++ STL) are sequence containers with dynamic sizes that can be expanded or contracted on both ends (either its front or its back). The member functions of deque that are mainly used are:
Deque Template:
std::deque<value_type>
Declaration:
deque&