diff --git a/problems/1371.find-the-longest-substring-containing-vowels-in-even-counts.md b/problems/1371.find-the-longest-substring-containing-vowels-in-even-counts.md index 03c269898..1a611d00a 100644 --- a/problems/1371.find-the-longest-substring-containing-vowels-in-even-counts.md +++ b/problems/1371.find-the-longest-substring-containing-vowels-in-even-counts.md @@ -159,11 +159,11 @@ class Solution { for (int i = len - 1; i >= 0; i--) { for (int j = 0; j < len - i; j++) { - if (checkValid(preSum, s, i, i + j)) - return i + 1 + if (checkValid(preSum, s, j, i + j)) + return i + 1; } } - return 0 + return 0; }