FunctionRacerProblemsRace

Row Ranges

EasyNumPyPython

For each row of the 2-D array grid, find the largest value minus the smallest value in that row. Return the results as a list, one number per row.

Example 1

grid [[1,9,4],[5,5,5]]
returns [8,0]

Row 0: 9 - 1 = 8. Row 1: 5 - 5 = 0.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More NumPy problems