Stack Implementation using Deque
A doubly ended queue or deque allows insertion and deletion at both ends. In a stack, we need to do insertions and deletions at one end only. We can use either end of deque (front or back) to implement a stack, In the below implementation, we use back (or rear) of stack to do both insertions and del