mirror of
https://github.com/CyC2018/Interview-Notebook.git
synced 2026-10-30 07:33:45 +00:00
Update 15. 二进制中 1 的个数.md
重新绘制配图。
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
n&(n-1) 位运算可以将 n 的位级表示中最低的那一位 1 设置为 0。不断将 1 设置为 0,直到 n 为 0。时间复杂度:O(M),其中 M 表示 1 的个数。
|
||||
|
||||
<div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/image-20201105004127554.png" width="500px"> </div><br>
|
||||
<div align="center"> <img src="pics/hamming-weight.png" width="560px"/> </div><br>
|
||||
|
||||
|
||||
```java
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
Reference in New Issue
Block a user