Skip to content
CampusEduX

Reverse an Array

Easyjavapythonccppjavascript

Given an array of N integers, reverse the order of its elements.

Input Format

The first line contains an integer N. The second line contains N space-separated integers.

Output Format

Print the N elements in reverse order, separated by single spaces, on one line.

Related Problems

  • Find the Largest Element
    Easy · java, python, c, cpp, javascript
    Solve Problem
  • Find the Smallest Element
    Easy · java, python, c, cpp, javascript
    Solve Problem
  • Find the Second Largest Element
    Easy · java, python, c, cpp, javascript
    Solve Problem

Input (stdin)

Output

Run your code to see output here...