Skip to content

Commit

Permalink
more rotations
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelleru committed Jul 6, 2017
1 parent 0b7d3a5 commit f65fe8c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions data_structures/AVL/AVL.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ def rotate_right(self, node):
node.getLeft().setHeight(node.getLeft().getHeight() - 1)

def double_rotate_left(self, node):
pass
self.rotate_right(node.getRight().getRight())
self.rotate_left(node)

def double_rotate_righs(self, node):
pass
def double_rotate_right(self, node):
self.rotate_left(node.getLeft().getLeft())
self.rotate_right(node)

0 comments on commit f65fe8c

Please sign in to comment.