Java Solution very easy

for loop A[i] =A[i]*A[i];

after the loop sort array
Arrays.sort(A);

Click here to start solving coding interview questions