Problems > Symmetric Matrix > Editorial

Symmetric Matrix — Solution & Editorial

Back to the Problem

Check g[i][j] = g[j][i] for all pairs (the upper triangle suffices).

Complexity: O(N2)