avltree/AVLTree.py
def _balance_factor(self, root) -> int:
        """Calculates the balance factor of the AVL Tree

        Args:
            root (AVLNode): the root of the tree

        Returns:
            int: resulting balance factor
        """
        if not root:
            return 0

        return self._height(root.left) - self._height(root.right)
Calculates the balance factor of the AVL Tree

        Args:
            root (AVLNode): the root of the tree

        Returns:
            int: resulting balance factor
        
Calculates the balance factor of the AVL Tree
Calculates the balance factor of the AVL Tree
def _balance_factor(self, root) -> int:
        if not root:
            return 0
        return self._height(root.left) - self._height(root.right)
def _balance_factor ( self , root ) -> int : if not root : return 0 return self . _height ( root . left ) - self . _height ( root . right )
Calculates the balance factor of the AVL Tree
Calculates the balance factor of the AVL Tree
"""Calculates the balance factor of the AVL Tree

        Args:
            root (AVLNode): the root of the tree

        Returns:
            int: resulting balance factor
        """
resulting balance factor
resulting balance factor
int
self
root
the root of the tree
the root of the tree