You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if self.balance_factor > 1:
# right is heavier
if self.right_child.balance < 0:
# right_child.left is heavier, RL case
self._rl_case()
elif self.right_child.balance > 0:
# right_child.right is heavier, RR case
self._rr_case()
elif self.balance_factor < -1:
# left is heavier
if self.left_child.balance < 0:
# left_child.left is heavier, LL case
self._ll_case()
elif self.left_child.balance > 0:
# left_child.right is heavier, LR case
self._lr_case()
Should be changed to
if self.balance_factor > 1:
# right is heavier
if self.right_child.balance_factor < 0:
# right_child.left is heavier, RL case
self._rl_case()
elif self.right_child.balance_factor > 0:
# right_child.right is heavier, RR case
self._rr_case()
elif self.balance_factor < -1:
# left is heavier
if self.left_child.balance_factor < 0:
# left_child.left is heavier, LL case
self._ll_case()
elif self.left_child.balance_factor > 0:
# left_child.right is heavier, LR case
self._lr_case()
Because there is no such property "balance", but only "balance_factor"
The text was updated successfully, but these errors were encountered:
It looks like a typo in lob.py (436:447).
Should be changed to
Because there is no such property "balance", but only "balance_factor"
The text was updated successfully, but these errors were encountered: