Premium problem119. Peak-to-Peak Range per Row

Easy Locked

Return the peak-to-peak range (max − min) of each row of 2-D array X, as a 1-D array with one entry per row.

Input

[[1 0 0 3 1]
 [3 6 6 2 9]
 [4 5 3 8 0]]

Output

[3 7 8]

Premium problem

This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.

Implement solve(...)