Doubt regarding Reversing a stack problem

How to do this question without using extra stack . Instead of stack can we take help of an array to reverse the stack?

@Lalit2142,
2 methods.

  1. Use recursion and hold the popped elements in the function.
  2. Implement a stack using linked list and reverse a stack like you would reverse a linked list.