user
Update the given code to make it more efficient.

Input: for (int i=0; i < N; i++)
  for (int j=0; j < N; j++)
    A[i][j] = A[j][i];

Output:
assistant
for (int i=0; i < N; i++)
  for (int j=i; j < N; j++)
    A[i][j] = A[j][i];