Determine Whether Matrix Can Be Obtained By Rotation

Solution Code

Time Complexity

O(n^2)

Space Complexity

O(1)