U9fix2
This commit is contained in:
parent
48f0636853
commit
798de4bda1
@ -13,15 +13,19 @@ class HuffmanTree:
|
|||||||
self.root = None
|
self.root = None
|
||||||
|
|
||||||
if data is not None:
|
if data is not None:
|
||||||
self.build_tree(data)
|
self.tree(data)
|
||||||
else:
|
else:
|
||||||
self.root = None
|
self.root = None
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
def tree(self):
|
def tree(self):
|
||||||
|
if self.root is None:
|
||||||
|
return {}
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def codes(self):
|
def codes(self):
|
||||||
|
if self.root is None:
|
||||||
|
return {}
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def encode(self, text):
|
def encode(self, text):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user