We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad8f848 commit 239d2f3Copy full SHA for 239d2f3
src/main/java/com/fishercoder/solutions/_340.java
@@ -29,7 +29,7 @@ public int lengthOfLongestSubstringKDistinct(String s, int k) {
29
num++;
30
}
31
if (num > k) {
32
- while (--count[s.charAt(left++)] > 0);
+ while (--count[s.charAt(left++)] > 0) {};
33
num--;
34
35
result = Math.max(result, right - left + 1);
0 commit comments