tricky
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```rust []\n\nimpl Solution {\n  pub fn are_similar(mat: Vec<Vec<i32>>, k: i32) -> bool {\n    let m = mat.len();\n    let n = mat[0].len();\n    let k = k as usize % n; // Normalize k to be within the range of column count\n\n        for i in 0..m {\n            for j in 0..n {\n                let new_j = if i % 2 == 0 {\n                    // Even-indexed rows: left shift\n                    (j + n - k) % n\n                } else {\n                    // Odd-indexed rows: right shift\n                    (j + k) % n\n                };\n\n                if mat[i][j] != mat[i][new_j] {\n                    return false;\n                }\n            }\n        }\n\n        true\n\n  }\n}\n```
['Rust']