File tree 3 files changed +5
-1
lines changed
3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -328,6 +328,7 @@ leetcode 题解,记录自己的 leetcode 解题之路。
328
328
- [ 0875. 爱吃香蕉的珂珂] ( ./problems/875.koko-eating-bananas.md )
329
329
- [ 0877. 石子游戏] ( ./problems/877.stone-game.md )
330
330
- [ 0886. 可能的二分法] ( ./problems/886.possible-bipartition.md )
331
+ - [ 0898. 子数组按位或操作] ( ./problems/898.bitwise-ors-of-subarrays.md ) 🆕
331
332
- [ 0900. RLE 迭代器] ( ./problems/900.rle-iterator.md )
332
333
- [ 0911. 在线选举] ( ./problems/911.online-election.md ) 🆕
333
334
- [ 0912. 排序数组] ( ./problems/912.sort-an-array.md )
Original file line number Diff line number Diff line change 190
190
- [ 0875. 爱吃香蕉的珂珂] ( problems/875.koko-eating-bananas.md )
191
191
- [ 0877. 石子游戏] ( problems/877.stone-game.md )
192
192
- [ 0886. 可能的二分法] ( problems/886.possible-bipartition.md )
193
+ - [ 0898. 子数组按位或操作] ( ./problems/898.bitwise-ors-of-subarrays.md ) 🆕
193
194
- [ 0900. RLE 迭代器] ( problems/900.rle-iterator.md )
194
195
- [ 0911. 在线选举] ( problems/911.online-election.md ) 🆕
195
196
- [ 0912. 排序数组] ( problems/912.sort-an-array.md )
Original file line number Diff line number Diff line change @@ -81,7 +81,9 @@ https://leetcode-cn.com/problems/bitwise-ors-of-subarrays/
81
81
82
82
- 用 pres 记录上一步的子数组异或值集合,也就是** 以索引 i - 1 结尾的子数组异或值集合**
83
83
- 遍历 pres,使用 pres 中的每一项和当前数进行或运算,并将结果重新放入 pres。最后别忘了把自身也放进去。
84
- > 为了防止迭代 pres 过程改变 pres 的值,我们可以用另外一个中间临时集合承载结果。
84
+
85
+ > 为了防止迭代 pres 过程改变 pres 的值,我们可以用另外一个中间临时集合承载结果。
86
+
85
87
- 将 pres 中的所有数加入 ans,其中 ans 为我们要返回的一个 hashset
86
88
87
89
## 关键点
You can’t perform that action at this time.
0 commit comments