Highest Cell Position
Find the largest value in the 2-D array grid and return its position as a list [row, column]. If the largest value appears more than once, return the one that comes first when reading rows from top to bottom and each row from left to right.
Example 1
grid [[1,7,3],[7,2,0]]
returns [0,1]
The largest value is 7. Its first appearance (reading row by row) is row 0, column 1.
Constraints
1 <= rows, columns <= 10
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More NumPy problems
- Matching PairsMedium
- Mean of Each GroupMedium
- Multiplication TableMedium
- Order by ScoreMedium
- Pairs Hitting TargetMedium
- Pairwise SumsMedium
- Path LengthMedium
- Rank of Each ScoreMedium