Challenge: Arithmetic Sequence
Find the index of an outlier in an arithmetic sequence.
We'll cover the following...
We'll cover the following...
Task
This task requires you to find the index of the first outlier in a given array. All numbers in an array are in an arithmetic sequence, except one number.
Write a program that uses an array and finds the index of the first outlier and stores it to the variable idx
. The array is guaranteed to have at least elements and the first two elements will be in the required arithmetic sequence. The value of the idx
should be ...