C# Runtime 102 ms Beats 81.82% Memory 48.94 MB Beats 68.18%
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\npublic class Solution {\n    public bool AreSimilar(int[][] mat, int k)\n    {\n        if(k % mat[0].Length == 0) return true;\n        \n        for(int i = 0; i < mat.Length; i++)\n        {\n            for(int j = 0; j < mat[0].Length; j++)\n            {\n                if(mat[i][j] != mat[i][(j + k) % mat[0].Length])\n                    return false;\n            }\n        }\n\n        return true;\n    }\n}\n```
['C#']