Geting segmentation fault

int Solution::maxArr(vector &A) {
int maxi=0;
int i,j,k;
for(i=1;i<=A.size();i++)
{
for(j=1;j<=A.size();j++)
{
for(k=1;j<=j;k++)
{
A[k]=abs(A[i]-A[j])+abs(i=j);
if (A[k]>maxi)
maxi=A[k];

                            }
                }
    }
    return maxi;

}

Click here to start solving coding interview questions