Last Updated: 6 Apr, 2018

Reverse an array

Moderate

Problem statement

Take as input N, a number. Take N more inputs and store that in an array. Write a recursive function which reverses the array. Print the values of reversed array.

Input Format:
Enter a number N and take N more inputs
Output Format:
Display values of the reversed array (separated by space)