HackerRank Deque-STL in C++ problem solution - TheCScience