Skip to content

Commit 16529dd

Browse files
authored
Update find-all-the-lonely-nodes.py
1 parent 7cd3842 commit 16529dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/find-all-the-lonely-nodes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ def getLonelyNodes(self, root):
2525
result.append(node.left.val)
2626
elif node.right and not node.left:
2727
result.append(node.right.val)
28-
stk.append((node.right))
29-
stk.append((node.left))
28+
stk.append(node.right)
29+
stk.append(node.left)
3030
return result
3131

3232

0 commit comments

Comments
 (0)