To view solutions, see the file arrays.py
in your text editor.
Task:
Given an array, A
, of N
integers, print A
's elements in reverse order as a single line of space-separated numbers.
Input Format
The first line contains an integer, N
(the size of our array).
The second line contains N
space-separated integers describing array A
's elements.
Output Format
Print the elements of array A
in reverse order as a single line of space-separated numbers.
Sample Input
4
1 4 3 2
Sample Output
2 3 4 1
Solution:
In arrays.py
.
Return to navigation list