Skip to content

Update basic_binary_tree.py #1833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions data_structures/binary_tree/basic_binary_tree.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Node: # This is the Class Node with constructor that contains data variable to type data and left,right pointers.
class Node: # This is the Class Node with a constructor that contains data variable to type data and left, right pointers.
def __init__(self, data):
self.data = data
self.left = None
Expand Down Expand Up @@ -37,7 +37,7 @@ def depth_of_tree(

def is_full_binary_tree(
tree,
): # This functions returns that is it full binary tree or not?
): # This function returns that is it full binary tree or not?
if tree is None:
return True
if (tree.left is None) and (tree.right is None):
Expand All @@ -48,7 +48,7 @@ def is_full_binary_tree(
return False


def main(): # Main func for testing.
def main(): # Main function for testing.
tree = Node(1)
tree.left = Node(2)
tree.right = Node(3)
Expand Down