Skip to content

Commit 825a25b

Browse files
authored
Update 239-Sliding-Window-Maximum.py
1 parent 2c47cad commit 825a25b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: python/239-Sliding-Window-Maximum.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def maxSlidingWindow(self, nums: List[int], k: int) -> List[int]:
44
q = collections.deque() # index
55
l = r = 0
66
# O(n) O(n)
7-
while l < len(nums):
7+
while r < len(nums):
88
# pop smaller values from q
99
while q and nums[q[-1]] < nums[r]:
1010
q.pop()

0 commit comments

Comments
 (0)