update leetcode

This commit is contained in:
2025-09-02 21:06:57 +08:00
parent 003eb24c77
commit c308ed1d64
20 changed files with 290 additions and 2 deletions

View File

@@ -0,0 +1,6 @@
[package]
name = "p191"
version = "0.1.0"
edition = "2024"
[dependencies]

View File

@@ -0,0 +1,7 @@
fn hamming_weight(n: i32) -> i32 {
n.count_ones() as i32
}
fn main() {
assert_eq!(hamming_weight(11), 3);
}