Untitled
unknown
plain_text
2 years ago
312 B
10
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