We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Numpy
- Min and Max
- Discussions
Min and Max
Min and Max
Sort by
recency
|
348 Discussions
|
Please Login in order to post a comment
Here is HackerRank Min and Max in Python solution - https://programmingoneonone.com/hackerrank-min-and-max-problem-solution-in-python.html
import numpy
n, m = map(int, input().split())
data = []
for _ in range(n): data.append(list(map(int, input().split())))
array = numpy.array(data)
print(numpy.max(numpy.min(array, axis=1)))
import numpy
n, m = map(int, input().split()) arr = []
for _ in range(n): arr.append([*map(int, input().split())]) arr = numpy.array(arr)
print(numpy.max(numpy.min(arr, axis=1)))