Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
splichte committed Sep 3, 2013
1 parent 66bac7b commit e71520a
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions T.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,11 @@ def insert(self, key, s):
new_internal = Node(s, None, node, node.parent)
new_leaf = Node(s, None, None, new_internal)
new_internal.left = new_leaf
try:
if node is node.parent.left:
node.parent.left = new_internal
node.adjust()
else:
node.parent.right = new_internal
except:
print node.value
print key
print s
self.root.print_tree()
if node is node.parent.left:
node.parent.left = new_internal
node.adjust()
else:
node.parent.right = new_internal
else:
new_internal = Node(node.value, node, None, node.parent)
new_leaf = Node(s, None, None, new_internal)
Expand Down

0 comments on commit e71520a

Please sign in to comment.