1. typo fix {playfair_cipher.py, AVL.py}

2. Corrected Logic {AVL.py, 104-107}
3. Removed unnecessary semicolons {BellmanFord.py, Dijkstra.py}
This commit is contained in:
ashu01
2017-12-31 14:30:31 +05:30
parent a033150426
commit 4fb978cf58
4 changed files with 21 additions and 21 deletions

View File

@ -1,6 +1,6 @@
'''
A AVL tree
'''
"""
An AVL tree
"""
from __future__ import print_function
@ -101,10 +101,10 @@ class AVL:
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)
h_right = (left_child.right.height
if (left_child.right is not None) else 0)
h_left = (left_child.left.height
if (left_child.left is not None) else 0)
if (h_left > h_right):
self.rotate_left(n)
break