Skip to content

Commit 5ca1a13

Browse files
authoredJun 12, 2023
Create Readme.md
1 parent 0238ff0 commit 5ca1a13

File tree

1 file changed

+5
-0
lines changed
  • Two_Pointers/2730.Find-the-Longest-Semi-Repetitive-Substring

1 file changed

+5
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
### 2730.Find-the-Longest-Semi-Repetitive-Substring
2+
3+
典型的双指针滑窗。我们试图维护一个合法的`[i,j)`的滑窗。
4+
5+
基本的算法是,固定一个i的位置,向右滑动右边界j,直至发现加入j后会使得[i:j]范围内“consecutive pair”的count达到2,此时停止j的移动。然后我们再开始下一个回合(i指向右边的位置)前,注意count是否需要因为i的移动而减一。

0 commit comments

Comments
 (0)
Please sign in to comment.