Skip to content

Commit 7f72c11

Browse files
solves min and max
1 parent 673d895 commit 7f72c11

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

numpy-python/min-max.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# https://www.hackerrank.com/challenges/np-min-and-max/problem
2+
3+
import numpy
4+
5+
N, M = map(int, input().split())
6+
data = []
7+
for _ in range(N):
8+
data.append(list(map(int, input().split())))
9+
10+
data = numpy.array(data)
11+
data = data.min(axis=1)
12+
result = data.max()
13+
print(result)

0 commit comments

Comments
 (0)