Untitled

 avatar
unknown
plain_text
a year ago
312 B
5
Indexable
def delete(self, data):
    if self.root is None:
        return
    if self.root.data != data:
        for child in self.root.children:
            child.delete(data)
    else:
        self.root.data = self.root.children[-1].data
        self.root.children = self.root.children[:len(self.root.children)]
Editor is loading...
Leave a Comment