Skip to content

Commit 252acb3

Browse files
authored
Update path-sum-iv.py
1 parent ee54048 commit 252acb3

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Python/path-sum-iv.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ def isParent(self, other):
2828
child = Node(num)
2929
while not parent.isParent(child):
3030
result += parent.val if parent.leaf else 0
31-
parent = q[0]
32-
q.popleft()
31+
parent = q.popleft()
3332
parent.leaf = False
3433
child.val += parent.val
3534
q.append(child)

0 commit comments

Comments
 (0)