changed rigt->right, a typo fix.

This commit is contained in:
Alvin Nguyen 2017-10-09 17:05:14 -07:00
parent dc5e86b701
commit ab058ab0b5
2 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@ class Node:
def __init__(self, label):
self.label = label
self.left = None
self.rigt = None
self.right = None
def getLabel(self):
return self.label
@ -23,10 +23,10 @@ class Node:
self.left = left
def getRight(self):
return self.rigt
return self.right
def setRight(self, right):
self.rigt = right
self.right = right
class BinarySearchTree:

View File

@ -67,6 +67,6 @@ print("Enter the edges (u v)")
for i in range(0, e):
u ,v = map(int, raw_input().split())
g.add_edge(u, v)
s = int(input("Enter the source node :"))
g.bfs(s)