Skip to content

Commit f186485

Browse files
committed
fix: fix x&(-x)
1 parent 1791224 commit f186485

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ print(nums) # [1, 1, 2, 2, 3, 3, 4, 4]
147147
## 五、技巧总结
148148

149149
### 二进制操作技巧
150-
| 操作 | 意义 |
151-
|-----------|----------------------|
152-
| x&(x - 1) | 用来去除 x 的最右边的 1 |
153-
| x&(-x) | lowbit,也就是取出最低位代表的数字 |
150+
| 操作 | 意义 |
151+
|-----------|--------------------------------------|
152+
| x&(x - 1) | 用来去除 x 的最右边的 1 |
153+
| x&(-x) | lowbit,也就是取出最低位1代表的数字(也就是最右边的1和后面的0) |
154154

0 commit comments

Comments
 (0)