Rust cheapest & best
\nimpl Solution {\n    pub fn reverse_str(s: String, k: i32) -> String {\n        s.chars()\n            .collect::<Vec<char>>()\n            .chunks(k as usize
```\nimpl Solution {\n    pub fn reverse_str(s: String, k: i32) -> String {\n        s.chars()\n            .collect::<Vec<char>>()\n            .chunks(k as usize)\n            .enumerate()\n            .map(|(i, chunk)| {\n                if i % 2 == 0 {\n                    chunk.into_iter().rev().collect::<String>()\n                } else {\n                    chunk.into_iter().collect()\n                }\n            }).collect()\n    }\n}\n```
[]