😸😸😸 easy js
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:\nO(1)\n\n- Space complexity:\nO(1)\n\n# Code\n```\n/**\n * @param {number[][]} mat\n * @param {number} k\n * @return {boolean}\n */\nvar areSimilar = function(mat, k) {\n    const n = mat.length;\n    const l = mat[0].length;\n    k = k % l;\n\n    for (let i=0; i<n; i++) {\n       const el1 = [...mat[i].slice(k), ...mat[i].slice(0, k)].join(\'\');\n       const el2 = mat[i].join(\'\');\n\n       if (el1 !== el2) return false\n    }\n\n    return true\n};\n```
['JavaScript']