Skip to content

Commit 45a2ee2

Browse files
change comments
1 parent c01d445 commit 45a2ee2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contest/src/main/java/com/github/contest/slidingWindow/SlidingWindowLeetcode.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ fun countSubArrayWithMaxElement(nums: IntArray, k: Int): Long {
149149
maxCount++
150150
}
151151

152-
// When we have at least k occurrences, we count all subarrays ending at right
152+
153153
while (maxCount >= k) {
154154
count += nums.size - right
155155
if (nums[left] == maxNum) {

0 commit comments

Comments
 (0)