Matrices and grids · 11 / 15 Exercise Medium

Is it symmetric?

Objective

A square matrix is symmetric if it equals its transpose: element m[i][j] matches m[j][i].

Instructions

  • The first line has the size n; then come n rows with n values.
  • Show Symmetric or Not symmetric.
Input
2
1 2
2 1
Output
Symmetric

Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.

Start exercise