aboutsummaryrefslogtreecommitdiff
path: root/challenge-217/eric-cheung/python/ch-1.py
blob: 5e86bfde73e128306f1d067b1a33448ad9e5729c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import numpy as np

## arrMatrix = np.array([[3, 1, 2], [5, 2, 4], [0, 1, 3]])  ## Example 1
## arrMatrix = np.array([[2, 1], [4, 5]])  ## Example 2
arrMatrix = np.array([[1, 0, 3], [0, 0, 0], [1, 2, 1]])  ## Example 3

arrList = arrMatrix.flatten()
arrList.sort()

if len(arrList) >= 3:
    print (arrList[2])
else:
    print (0)