Skip to content

Commit cce8a9f

Browse files
authored
Update check-if-a-string-is-a-valid-sequence-from-root-to-leaves-path-in-a-binary-tree.py
1 parent f942d88 commit cce8a9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/check-if-a-string-is-a-valid-sequence-from-root-to-leaves-path-in-a-binary-tree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def isValidSequence(self, root, arr):
2020
q = [root]
2121
for depth in xrange(len(arr)):
2222
new_q = []
23-
for _ in xrange(len(q)):
23+
while q:
2424
node = q.pop()
2525
if not node or node.val != arr[depth]:
2626
continue

0 commit comments

Comments
 (0)