public static int biggestArrayGap(int []a, int n)
{
int biggestGap = Math.abs(a[1]-a[0]);
for (int i=1; i<n-1; i++)
{
if (Math.abs(a[i]-a[i-1]) > biggestGap)
Math.abs(a[i]-a[i-1]) = biggestGap;
}
return biggestGap;
}
For some reason, the second line in the if statement is returning as unexpected type– required: variable found: value. I tried == and that obviously didn't work. Any insight?