Add/remove from both front and back.
Real Life: Line where you can join from either end.
No user input.
Operations are performed on a deque (double-ended queue).
Elements of deque after add and remove operations.
• Use deque concept
• Add and remove allowed from both ends
A deque (double-ended queue) allows insertion and deletion
from both front and back.
This is like a line where people can join or leave from either end.
1.Create a deque.
2.Add element at front using push_front().
3.Add element at back using push_back().
4.Remove element from front using pop_front().
5.Remove element from back using pop_back().
6.Print remaining elements of deque.