diff --git a/graphs_trees/bst/bst.py b/graphs_trees/bst/bst.py index 9b23e8e..787d3c8 100644 --- a/graphs_trees/bst/bst.py +++ b/graphs_trees/bst/bst.py @@ -7,7 +7,10 @@ class Node(object): self.parent = None def __repr__(self): - return str(self.data) + return 'Node' % (self.data,) + + def __eq__(self, other): + return isinstance(other, Node) and self.data == other.data class Bst(object): @@ -40,4 +43,4 @@ class Bst(object): node.right.parent = node return node.right else: - return self._insert(node.right, data) \ No newline at end of file + return self._insert(node.right, data)