Untitled
Anonymous
plain_text
01/19/2024 8:54 AM
416 B
20
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