1886. Determine Whether Matrix Can Be Obtained By Rotation
Previous1885. Count Pairs in Two ArraysNext1887. Reduction Operations to Make the Array Elements Equal
Last updated
Last updated
https://leetcode.com/problems/determine-whether-matrix-can-be-obtained-by-rotation
Given two n x n
binary matrices mat
and target
, return true
if it is possible to make mat
equal to target
by rotating mat
in 90-degree increments, or false
otherwise.
Example 1:
Example 2:
Example 3:
Constraints:
n == mat.length == target.length
n == mat[i].length == target[i].length
1 <= n <= 10
mat[i][j]
and target[i][j]
are either 0
or 1
.