FunctionRacerProblemsRace

Most Different Position

EasyNumPyPython

a and b are two arrays of the same length. Return the index i where |a[i] - b[i]| is the largest. If there is a tie, return the smallest such index.

Example 1

a [1,5,9]
b [2,1,8]
returns 1

The gaps are 1, 4 and 1, so index 1.

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