This commit is contained in:
Marege 2026-11-10 18:43:27 +01:00
parent 6fd5db8bcb
commit e6e8058fac

View File

@ -53,6 +53,9 @@ class HuffmanTree:
return self.root
def codes(self):
if self.root.left is None and self.root.right is None:
return {self.root.data: "0"}
codik = {}
if self.root is None:
return {}