Matrix Symmetry Check Problem Statement

You are provided with a square matrix. Your task is to determine if the matrix is symmetric. Return true if it is symmetric, otherwise return false.

A matrix is considered symmetric if its transpose is identical to the original matrix.

Example:

Input:
T = 1
N = 3
Matrix = [[1, 2, 3], [2, 4, 5], [3, 5, 6]]
Output:
true
Explanation:

The given matrix is symmetric because its transpose is equal to the matrix itself.

Constraints:

  • 1 ≤ T ≤ 10
  • 1 ≤ N ≤ 102
  • -109 ≤ data ≤ 109
  • Time Limit: 1 sec
Be the first one to answer
Add answer anonymously...
Symphony Talent Software Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter