

Input: [1,2,3,4,5]
Output: [5,4,3,2,1]

The first line of input contains an integer value 'N', denoting the size of the input Stack.
The second line contains 'N' single space-separated integers, denoting the stack elements, where the leftmost integer denotes the TOP element of Stack.
'N' single space-separated integers in a single line, where the leftmost integer denotes the TOP element of the reversed stack.
We will be using two recursive methods:
Algorithm: