Skip to content

Commit e7f57b6

Browse files
author
lucifer
committed
feat: $898
1 parent 53249c0 commit e7f57b6

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ leetcode 题解,记录自己的 leetcode 解题之路。
328328
- [0875. 爱吃香蕉的珂珂](./problems/875.koko-eating-bananas.md)
329329
- [0877. 石子游戏](./problems/877.stone-game.md)
330330
- [0886. 可能的二分法](./problems/886.possible-bipartition.md)
331+
- [0898. 子数组按位或操作](./problems/898.bitwise-ors-of-subarrays.md) 🆕
331332
- [0900. RLE 迭代器](./problems/900.rle-iterator.md)
332333
- [0911. 在线选举](./problems/911.online-election.md) 🆕
333334
- [0912. 排序数组](./problems/912.sort-an-array.md)

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@
190190
- [0875. 爱吃香蕉的珂珂](problems/875.koko-eating-bananas.md)
191191
- [0877. 石子游戏](problems/877.stone-game.md)
192192
- [0886. 可能的二分法](problems/886.possible-bipartition.md)
193+
- [0898. 子数组按位或操作](./problems/898.bitwise-ors-of-subarrays.md) 🆕
193194
- [0900. RLE 迭代器](problems/900.rle-iterator.md)
194195
- [0911. 在线选举](problems/911.online-election.md) 🆕
195196
- [0912. 排序数组](problems/912.sort-an-array.md)

problems/898.bitwise-ors-of-subarrays.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ https://leetcode-cn.com/problems/bitwise-ors-of-subarrays/
8181

8282
- 用 pres 记录上一步的子数组异或值集合,也就是**以索引 i - 1 结尾的子数组异或值集合**
8383
- 遍历 pres,使用 pres 中的每一项和当前数进行或运算,并将结果重新放入 pres。最后别忘了把自身也放进去。
84-
> 为了防止迭代 pres 过程改变 pres 的值,我们可以用另外一个中间临时集合承载结果。
84+
85+
> 为了防止迭代 pres 过程改变 pres 的值,我们可以用另外一个中间临时集合承载结果。
86+
8587
- 将 pres 中的所有数加入 ans,其中 ans 为我们要返回的一个 hashset
8688

8789
## 关键点

0 commit comments

Comments
 (0)