Simple
\n\n# Code\n\nbool areSimilar(vector<vector<int>>& mat, int k) {\n    int m = mat.size(), n = mat[0].size();\n    for(int i = 0; i < m; ++i){\n        for(int j
\n\n# Code\n```\nbool areSimilar(vector<vector<int>>& mat, int k) {\n    int m = mat.size(), n = mat[0].size();\n    for(int i = 0; i < m; ++i){\n        for(int j = 0; j < n; ++j){ \n            int newInd = (j + n + k) % n;\n            if(mat[i][j] != mat[i][newInd]) return false;\n        }\n    }\n    return true;\n}\n```
['C++']