Ezvor

1228. Missing Number In Arithmetic Progression

EasyArray Preparing judge… LeetCode
ArrayMath

Hints

Hint 1
Assume the sequence is increasing, what if we find the largest consecutive difference?
Hint 2
Is the missing element in the middle of the segment with the largest consecutive difference?
Hint 3
For decreasing sequences, just reverse the array and do a similar process.