1228. Missing Number In Arithmetic Progression
In some array
arr
, the values were in arithmetic progression: the valuesarr[i + 1] - arr[i]
are all equal for every0 <= i < arr.length - 1
.A value from
arr
was removed that was not the first or last value in the array.Given
arr
, return the removed value.
c++
1 | class Solution { |