Rust Palindrome Rearranging
use std::collections::HashMap;
fn palindrome_rearranging(input_string: &str) -> bool {
let mut counts: HashMap<char, i64> = HashMap::new();
for c in input_string.chars() {
*counts.entry(c).or_insert(0) += 1;
}
counts.values().filter(|&&v| v % 2 != 0).count() <= 1
}
This counts character frequency and checks whether the string has the right number of odd counts to form a palindrome.