Easy to understand solution -> Beats 99.51%
IntuitionApproachComplexity

Time complexity:
O(n)


Space complexity:
O(1)

Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
O(n)

- Space complexity:
O(1)

# Code
```java []
class Solution {
    public boolean areSimilar(int[][] mat, int k) {

        int n = mat[0].length;
        for (int[] row : mat)
            for (int j = 0; j < n; j++)
                if (row[j] != row[(j + k) % n])
                    return false;
        
        return true;
    }
}
```
['Java']