Skip to content

Commit

Permalink
Update a node==None case
Browse files Browse the repository at this point in the history
  • Loading branch information
DechinPhy committed May 22, 2020
1 parent faae8e2 commit 09f53d6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions binarytree/__init__.py
Expand Up @@ -344,6 +344,8 @@ def get_parent_node(root, node):
/
3
"""
if node is None:
return None
node_stack = []
while True:
if root is not None:
Expand Down

0 comments on commit 09f53d6

Please sign in to comment.