Write a component that determines whether a hardcoded matrix is symmetric and displays the result.
HardProblem Statement
Write a component that determines whether a hardcoded matrix is symmetric and displays the result.
Sample Input
[[1, 2, 3], [2, 4, 5], [3, 5, 6]]
Sample Output
Is Symmetric: true
Limits
Time: 2s · Memory: 256 MB
Code Editor
00:00
import React from "react";
const SymmetricMatrix = () => {
return (
<div>
{/* Display whether the matrix is symmetric */}
</div>
);
};
export default SymmetricMatrix;
Input
[[1, 2, 3], [2, 4, 5], [3, 5, 6]]
Expected Output
Is Symmetric: true