Free written solution

Determine Whether Matrix Can Be Obtained By Rotation (LeetCode 1886): Solution and Explanation

Given two n x n binary matrices mat and target, decide whether some number of 90-degree rotations turns mat into target.

Read the intuition, approach, code and complexity →