Rust Solution
\nimpl Solution {\n    pub fn group_anagrams(strs: Vec<String>) -> Vec<Vec<String>> {\n        let mut out = std::collections::HashMap::new();\n        for v in
```\nimpl Solution {\n    pub fn group_anagrams(strs: Vec<String>) -> Vec<Vec<String>> {\n        let mut out = std::collections::HashMap::new();\n        for v in strs {\n            let mut k: Vec<u8> = v.bytes().collect();\n            k.sort_unstable();\n            out.entry(k).or_insert_with(|| vec![]).push(v)\n        }\n        out.into_iter().map(|(_, v)| v).collect()\n    }\n}\n```
[]