1886. Determine Whether Matrix Can Be Obtained By Rotation

https://leetcode.com/problems/determine-whether-matrix-can-be-obtained-by-rotation

Description

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.

ac

Last updated

Was this helpful?