diff --git a/notes/15. 二进制中 1 的个数.md b/notes/15. 二进制中 1 的个数.md index bea92147..ff8c3d41 100644 --- a/notes/15. 二进制中 1 的个数.md +++ b/notes/15. 二进制中 1 的个数.md @@ -2,7 +2,7 @@ ## 题目链接 -[牛客网](https://www.nowcoder.com/practice/8ee967e43c2c4ec193b040ea7fbb10b8?tpId=13&tqId=11164&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) +[Leetcode](https://leetcode.cn/problems/er-jin-zhi-zhong-1de-ge-shu-lcof/) ## 题目描述 @@ -16,7 +16,7 @@ n&(n-1) 位运算可以将 n 的位级表示中最低的那一位 1 设置为 0 ```java -public int NumberOf1(int n) { +public int hammingWeight(int n) { int cnt = 0; while (n != 0) { cnt++;