6903d95b41206d757540f48230e245e7f28b8667,data_structures/AVL/AVL.py,AVL,rebalance,#AVL#Any#,77
Before Change
if node.getRight() is not None:
height_right = node.getRight().getHeight()
if node.getLeft() is not None:
height_left = node.getLeft().getHeight()
if abs(height_left - height_right) > 1:
if height_left > height_right:
// left_child = node.getRight()
if ():
After Change
if n.right is not None:
height_right = n.right.height
if n.left is not None:
height_left = n.left.height
if abs(height_left - height_right) > 1:
if height_left > height_right:
left_child = n.left
if left_child is not None:
h_right = (right_child.right.height
if (right_child.right is not None) else 0)
h_left = (right_child.left.height
if (right_child.left is not None) else 0)
if (h_left > h_right):
self.rotate_left(n)
break
else:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: TheAlgorithms/Python
Commit Name: 6903d95b41206d757540f48230e245e7f28b8667
Time: 2017-10-02
Author: rafaelleru95103@gmail.com
File Name: data_structures/AVL/AVL.py
Class Name: AVL
Method Name: rebalance
Project Name: TheAlgorithms/Python
Commit Name: 8384cbb8792cade306b630b56917e9ee41b4ba55
Time: 2017-07-07
Author: rafaelleru95103@gmail.com
File Name: data_structures/AVL/AVL.py
Class Name: AVL
Method Name: rebalance
Project Name: TheAlgorithms/Python
Commit Name: 6903d95b41206d757540f48230e245e7f28b8667
Time: 2017-10-02
Author: rafaelleru95103@gmail.com
File Name: data_structures/AVL/AVL.py
Class Name: AVL
Method Name: rebalance
Project Name: TheAlgorithms/Python
Commit Name: 8e41aca1b943d9bbbd742f57a0aa58cfa5e6c35e
Time: 2017-07-10
Author: rafaelleru95103@gmail.com
File Name: data_structures/AVL/AVL.py
Class Name: AVL
Method Name: rebalance