We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a33d306 commit a45411eCopy full SHA for a45411e
1d-arrays/hackerrank/arrays-ds/solution.py
@@ -0,0 +1,33 @@
1
+#!/bin/python3
2
+
3
+import math
4
+import os
5
+import random
6
+import re
7
+import sys
8
9
+#
10
+# Complete the 'reverseArray' function below.
11
12
+# The function is expected to return an INTEGER_ARRAY.
13
+# The function accepts INTEGER_ARRAY a as parameter.
14
15
16
+def reverseArray(a):
17
+ # Write your code here
18
+ return a[::-1]
19
20
21
+if __name__ == '__main__':
22
+ fptr = open(os.environ['OUTPUT_PATH'], 'w')
23
24
+ arr_count = int(input().strip())
25
26
+ arr = list(map(int, input().rstrip().split()))
27
28
+ res = reverseArray(arr)
29
30
+ fptr.write(' '.join(map(str, res)))
31
+ fptr.write('\n')
32
33
+ fptr.close()
0 commit comments