Skip to content

Commit c82b088

Browse files
committed
init deque doesn't require empty []
1 parent b55ed99 commit c82b088

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Python/01-matrix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def updateMatrix(self, matrix):
1010
:type matrix: List[List[int]]
1111
:rtype: List[List[int]]
1212
"""
13-
queue = collections.deque([])
13+
queue = collections.deque()
1414
for i in xrange(len(matrix)):
1515
for j in xrange(len(matrix[0])):
1616
if matrix[i][j] == 0:

Python/moving-average-from-data-stream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def __init__(self, size):
1212
"""
1313
self.__size = size
1414
self.__sum = 0
15-
self.__q = deque([])
15+
self.__q = deque()
1616

1717
def next(self, val):
1818
"""

Python/surrounded-regions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Solution(object):
1111
def solve(self, board):
1212
if not board:
1313
return
14-
q = collections.deque([])
14+
q = collections.deque()
1515

1616
for i in xrange(len(board)):
1717
q.append((i, 0))

0 commit comments

Comments
 (0)