2019-11-10 LeetCode in Rust LeetCode 1207. Unique Number of Occurrences Problem Statement impl Solution { pub fn unique_occurrences(arr: Vec<i32>) -> bool { use std::collections::{HashMap, HashSet}; let (mut map, mut set) = (HashMap::new(), HashSet::new()); for i in arr { *(map.entry(i).or_insert(0)) += 1; } for (_, val) in map { if set.contains(&val) { return false; } set.insert(val); } return true; }} Newer LeetCode 1184. Distance Between Bus Stops Older LeetCode 1209. Remove All Adjacent Duplicates in String II