trees.py
def remove(self, name: str) -> None:
        """ Remove information about a player named <name> from this tree.
        if self contains a tree with only one leaf subtree, the name
        and point of this subtree is promoted to the parent node.
        if a player with the name <name> does not exist in the tree, the method
        fail silently without making any changes to the tree.

        Runtime: O(n)

        >>> tree = QuadTree((100, 100))
        >>> tree.insert('a', (90, 90))
        >>> tree.insert('b', (150, 150))
        >>> 'a' in tree
        True
        >>> tree.remove('a')
        >>> 'a' in tree
        False
        >>> tree.contains_point((90, 90))
        False
        >>> 'b' in tree
        True
        >>> tree.is_leaf()
        True
        """
        if self._name == name:
            self._name, self._point = None, None
        elif self._nw and name in self._nw:
            self._nw.remove(name)
            if self._nw.is_empty():
                self._nw = None
            self._check_one_child()
        elif self._sw and name in self._sw:
            self._sw.remove(name)
            if self._sw.is_empty():
                self._sw = None
            self._check_one_child()
        elif self._ne and name in self._ne:
            self._ne.remove(name)
            if self._ne.is_empty():
                self._ne = None
            self._check_one_child()
        else:
            if self._se:
                self._se.remove(name)
                if self._se.is_empty():
                    self._se = None
                self._check_one_child()
 Remove information about a player named <name> from this tree.
        if self contains a tree with only one leaf subtree, the name
        and point of this subtree is promoted to the parent node.
        if a player with the name <name> does not exist in the tree, the method
        fail silently without making any changes to the tree.

        Runtime: O(n)

        >>> tree = QuadTree((100, 100))
        >>> tree.insert('a', (90, 90))
        >>> tree.insert('b', (150, 150))
        >>> 'a' in tree
        True
        >>> tree.remove('a')
        >>> 'a' in tree
        False
        >>> tree.contains_point((90, 90))
        False
        >>> 'b' in tree
        True
        >>> tree.is_leaf()
        True
        
Remove information about a player named  from this tree.
if self contains a tree with only one leaf subtree, the name
and point of this subtree is promoted to the parent node.
if a player with the name  does not exist in the tree, the method
fail silently without making any changes to the tree.




Remove information about a player named from this tree . if self contains a tree with only one leaf subtree the name and point of this subtree is promoted to the parent node . if a player with the name does not exist in the tree the method fail silently without making any changes to the tree .
def remove(self, name: str) -> None:
        if self._name == name:
            self._name, self._point = None, None
        elif self._nw and name in self._nw:
            self._nw.remove(name)
            if self._nw.is_empty():
                self._nw = None
            self._check_one_child()
        elif self._sw and name in self._sw:
            self._sw.remove(name)
            if self._sw.is_empty():
                self._sw = None
            self._check_one_child()
        elif self._ne and name in self._ne:
            self._ne.remove(name)
            if self._ne.is_empty():
                self._ne = None
            self._check_one_child()
        else:
            if self._se:
                self._se.remove(name)
                if self._se.is_empty():
                    self._se = None
                self._check_one_child()
def remove ( self , name : str ) -> None : if self . _name == name : self . _name , self . _point = None , None elif self . _nw and name in self . _nw : self . _nw . remove ( name ) if self . _nw . is_empty ( ) : self . _nw = None self . _check_one_child ( ) elif self . _sw and name in self . _sw : self . _sw . remove ( name ) if self . _sw . is_empty ( ) : self . _sw = None self . _check_one_child ( ) elif self . _ne and name in self . _ne : self . _ne . remove ( name ) if self . _ne . is_empty ( ) : self . _ne = None self . _check_one_child ( ) else : if self . _se : self . _se . remove ( name ) if self . _se . is_empty ( ) : self . _se = None self . _check_one_child ( )
Remove information about a player named <name> from this tree.
Remove information about a player named <name > from this tree .
""" Remove information about a player named <name> from this tree.
        if self contains a tree with only one leaf subtree, the name
        and point of this subtree is promoted to the parent node.
        if a player with the name <name> does not exist in the tree, the method
        fail silently without making any changes to the tree.

        Runtime: O(n)

        >>> tree = QuadTree((100, 100))
        >>> tree.insert('a', (90, 90))
        >>> tree.insert('b', (150, 150))
        >>> 'a' in tree
        True
        >>> tree.remove('a')
        >>> 'a' in tree
        False
        >>> tree.contains_point((90, 90))
        False
        >>> 'b' in tree
        True
        >>> tree.is_leaf()
        True
        """
self
name
str