File tree Expand file tree Collapse file tree 8 files changed +12
-12
lines changed
2981.Find Longest Special Substring That Occurs Thrice I
2982.Find Longest Special Substring That Occurs Thrice II Expand file tree Collapse file tree 8 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ class Solution {
126
126
127
127
private boolean check (int x ) {
128
128
int [] cnt = new int [26 ];
129
- for (int i = 0 ; i < n; ) {
129
+ for (int i = 0 ; i < n;) {
130
130
int j = i + 1 ;
131
131
while (j < n && s. charAt(j) == s. charAt(i)) {
132
132
j++ ;
@@ -153,7 +153,7 @@ public:
153
153
int l = 0, r = n;
154
154
auto check = [ &] (int x) {
155
155
int cnt[ 26] {};
156
- for (int i = 0; i < n; ) {
156
+ for (int i = 0; i < n;) {
157
157
int j = i + 1;
158
158
while (j < n && s[ j] == s[ i] ) {
159
159
++j;
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ class Solution {
116
116
117
117
private boolean check (int x ) {
118
118
int [] cnt = new int [26 ];
119
- for (int i = 0 ; i < n; ) {
119
+ for (int i = 0 ; i < n;) {
120
120
int j = i + 1 ;
121
121
while (j < n && s. charAt(j) == s. charAt(i)) {
122
122
j++ ;
@@ -143,7 +143,7 @@ public:
143
143
int l = 0, r = n;
144
144
auto check = [ &] (int x) {
145
145
int cnt[ 26] {};
146
- for (int i = 0; i < n; ) {
146
+ for (int i = 0; i < n;) {
147
147
int j = i + 1;
148
148
while (j < n && s[ j] == s[ i] ) {
149
149
++j;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ class Solution {
5
5
int l = 0 , r = n;
6
6
auto check = [&](int x) {
7
7
int cnt[26 ]{};
8
- for (int i = 0 ; i < n; ) {
8
+ for (int i = 0 ; i < n;) {
9
9
int j = i + 1 ;
10
10
while (j < n && s[j] == s[i]) {
11
11
++j;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public int maximumLength(String s) {
19
19
20
20
private boolean check (int x ) {
21
21
int [] cnt = new int [26 ];
22
- for (int i = 0 ; i < n ; ) {
22
+ for (int i = 0 ; i < n ;) {
23
23
int j = i + 1 ;
24
24
while (j < n && s .charAt (j ) == s .charAt (i )) {
25
25
j ++;
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ class Solution {
126
126
127
127
private boolean check (int x ) {
128
128
int [] cnt = new int [26 ];
129
- for (int i = 0 ; i < n; ) {
129
+ for (int i = 0 ; i < n;) {
130
130
int j = i + 1 ;
131
131
while (j < n && s. charAt(j) == s. charAt(i)) {
132
132
j++ ;
@@ -153,7 +153,7 @@ public:
153
153
int l = 0, r = n;
154
154
auto check = [ &] (int x) {
155
155
int cnt[ 26] {};
156
- for (int i = 0; i < n; ) {
156
+ for (int i = 0; i < n;) {
157
157
int j = i + 1;
158
158
while (j < n && s[ j] == s[ i] ) {
159
159
++j;
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ class Solution {
116
116
117
117
private boolean check (int x ) {
118
118
int [] cnt = new int [26 ];
119
- for (int i = 0 ; i < n; ) {
119
+ for (int i = 0 ; i < n;) {
120
120
int j = i + 1 ;
121
121
while (j < n && s. charAt(j) == s. charAt(i)) {
122
122
j++ ;
@@ -143,7 +143,7 @@ public:
143
143
int l = 0, r = n;
144
144
auto check = [ &] (int x) {
145
145
int cnt[ 26] {};
146
- for (int i = 0; i < n; ) {
146
+ for (int i = 0; i < n;) {
147
147
int j = i + 1;
148
148
while (j < n && s[ j] == s[ i] ) {
149
149
++j;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ class Solution {
5
5
int l = 0 , r = n;
6
6
auto check = [&](int x) {
7
7
int cnt[26 ]{};
8
- for (int i = 0 ; i < n; ) {
8
+ for (int i = 0 ; i < n;) {
9
9
int j = i + 1 ;
10
10
while (j < n && s[j] == s[i]) {
11
11
++j;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public int maximumLength(String s) {
19
19
20
20
private boolean check (int x ) {
21
21
int [] cnt = new int [26 ];
22
- for (int i = 0 ; i < n ; ) {
22
+ for (int i = 0 ; i < n ;) {
23
23
int j = i + 1 ;
24
24
while (j < n && s .charAt (j ) == s .charAt (i )) {
25
25
j ++;
You can’t perform that action at this time.
0 commit comments