Skip to content

Commit

Permalink
fix some style errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelleru committed Jul 4, 2017
1 parent a3972dd commit 817c274
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions data_structures/Binary Tree/binary_seach_tree.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'''
A binary search Tree
'''


class Node:

def __init__(self, label):
Expand Down Expand Up @@ -34,7 +36,7 @@ def __init__(self):

def insert(self, label):

#Create a new Node
# Create a new Node

node = Node(label)

Expand All @@ -45,7 +47,7 @@ def insert(self, label):
curr_node = self.root

while True:
if curr_node != None:
if curr_node is not None:

dad_node = curr_node

Expand All @@ -61,12 +63,12 @@ def insert(self, label):
break

def empty(self):
if self.root == None:
if self.root is None:
return True
return False

def preShow(self, curr_node):
if curr_node != None:
if curr_node is None:
print(curr_node.getLabel(), end=" ")

self.preShow(curr_node.getLeft())
Expand Down

0 comments on commit 817c274

Please sign in to comment.