Skip to content

Commit c381d65

Browse files
fix build
1 parent 45c398e commit c381d65

File tree

1 file changed

+2
-3
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+2
-3
lines changed

src/main/java/com/fishercoder/solutions/_340.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ public int lengthOfLongestSubstringKDistinct(String s, int k) {
2323
num++;
2424
}
2525
if (num > k) {
26-
while (--count[s.charAt(left++)] > 0) {
27-
num--;
28-
}
26+
while (--count[s.charAt(left++)] > 0);
27+
num--;
2928
}
3029
result = Math.max(result, right - left + 1);
3130
}

0 commit comments

Comments
 (0)