Skip to content

Commit 6b3bf60

Browse files
authored
Update sliding-window-maximum.py
1 parent b7631a3 commit 6b3bf60

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Python/sliding-window-maximum.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ def maxSlidingWindow(self, nums, k):
1111
:type k: int
1212
:rtype: List[int]
1313
"""
14-
dq = deque()
15-
result = []
14+
result, dq = [], deque()
1615
for i in xrange(len(nums)):
1716
if dq and i-dq[0] == k:
1817
dq.popleft()

0 commit comments

Comments
 (0)