class Node:
def __init__(self,value = None):
self.value = value
self.left = None
self.right = None
class binary_search_tree:
def __init__(self):
self.root = None
def insert(self,current,value):
if current == None:
current = Node(value)
elif value < current.value:
self.insert(current.left,value)
elif value > current.value:
self.insert(current.right,value)
tree = binary_search_tree()
for i in (12,5,18,3,4,6):
tree.insert(tree.root,i)
The insert method for my binary search tree is not working can someone help me out.
(Post is mostly code, please add more details.)