Skip to content

Commit

Permalink
Update Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wisdompeak authored Jul 1, 2021
1 parent e15335d commit d0f1a3e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Hash/1915.Number-of-Wonderful-Substrings/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@
如果我们希望这个区间里面的字符k的频次是奇数,那么意味着我们只要找一个位置j,使得```state[j] == state[i]^(1<<k)``` 即可,即第k为的bit是不一样的。同样,我们记录过这样的state在之前出现过几次,就说明有多少个这样的左端点,也就是有多少个符合此要求的区间。注意,这样的字符k有10种可能,所以需要一个10次的循环。

每处理完一个元素i,记得将state[i]所对应的计数器要加1.

本题非常类似```1542.Find-Longest-Awesome-Substring```.

0 comments on commit d0f1a3e

Please sign in to comment.