Rust counting solution
rust\nimpl Solution {\n    pub fn reordered_power_of2(n: i32) -> bool {\n        let digit_counts = |n: i32| -> [usize; 10] {\n            let mut n = n;\n     
```rust\nimpl Solution {\n    pub fn reordered_power_of2(n: i32) -> bool {\n        let digit_counts = |n: i32| -> [usize; 10] {\n            let mut n = n;\n            let mut d = [0; 10];\n            while n > 0 {\n                d[(n % 10) as usize] += 1;\n                n /= 10;\n            }\n            d\n        };\n        let counts = digit_counts(n);\n        (0..31).any(|i| digit_counts(1 << i) == counts)\n    }\n}\n```
['Rust']