Skip to content

Commit 4086e06

Browse files
small change code
1 parent 159612b commit 4086e06

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
@@ -779,7 +779,7 @@ private fun atMostKProduct(nums: IntArray, k: Int): Int {
779779
var product = 1
780780
var count = 0
781781

782-
for (right in 0 until nums.size) {
782+
for (right in nums.indices) {
783783
product *= nums[right]
784784

785785
while (left <= right && product > k) {

0 commit comments

Comments
 (0)