Skip to content

Commit

Permalink
Update 01.Bit-Operation.md
Browse files Browse the repository at this point in the history
  • Loading branch information
itcharge committed Feb 25, 2023
1 parent 358766c commit a33616c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ class Solution:
| **去掉右边起第一个 `1` 的左边** | <code>x & (x ^ (x - 1))</code> 或 <code>x & (-x)</code> | `100101000 -> 1000` |
| **从右边开始,把最后一个 `1` 改写成 `0`** | <code>x & (x - 1)</code> | `100101000 -> 100100000` |

### 3.2 二进制枚举子集
### 3.3 二进制枚举子集

除了上面的这些常见操作,我们经常常使用二进制数第 $1 \sim n$ 位上 $0$ 或 $1$ 的状态来表示一个由 $1 \sim n$ 组成的集合。也就是说通过二进制来枚举子集。

Expand Down

0 comments on commit a33616c

Please sign in to comment.