FunctionRacerProblemsRace

Is Symmetric

EasyNumPyPython

A square table is symmetric if it looks the same after swapping its rows and columns, which means m[i][j] == m[j][i] for every i and j. Return True if m is symmetric, otherwise False.

Example 1

m [[1,2],[2,3]]
returns true

m[0][1] and m[1][0] are both 2.

Example 2

m [[1,2],[5,3]]
returns false

2 and 5 differ.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More NumPy problems