Tap here to switch tabs
Problem
Submissions

Problem: Determine Whether Matrix Can Be Obtained By Rotation

Determine Whether Matrix Can Be Obtained By Rotation asks whether one binary square matrix can match another after rotating it clockwise by zero, 90, 180, or 270 degrees.

Statement

Given two n×nn \times n binary matrices mat and target, determine whether mat can be made equal to target by rotating it clockwise in increments of 9090 degrees.

Return true if mat can be made equal to target, or false otherwise.

Constraints:

  • n == mat.length == target.length

  • n == mat[i].length == target[i].length

  • 1≤1 \leq n ≤10\leq 10

  • mat[i][j] and target[i][j] are either 00 or 11

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Determine Whether Matrix Can Be Obtained By Rotation

Determine Whether Matrix Can Be Obtained By Rotation asks whether one binary square matrix can match another after rotating it clockwise by zero, 90, 180, or 270 degrees.

Statement

Given two n×nn \times n binary matrices mat and target, determine whether mat can be made equal to target by rotating it clockwise in increments of 9090 degrees.

Return true if mat can be made equal to target, or false otherwise.

Constraints:

  • n == mat.length == target.length

  • n == mat[i].length == target[i].length

  • 1≤1 \leq n ≤10\leq 10

  • mat[i][j] and target[i][j] are either 00 or 11