
Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Assume the sequence is increasing, what if we find the largest consecutive difference?
Is the missing element in the middle of the segment with the largest consecutive difference?
For decreasing sequences, just reverse the array and do a similar process.