new
This commit is contained in:
parent
5adaba293f
commit
1aa37a2ed8
12
u9/huffman_tree.py
Normal file
12
u9/huffman_tree.py
Normal file
@ -0,0 +1,12 @@
|
||||
class HuffmanNode:
|
||||
def __init__(self, data=None, frequency=0, left=None, right=None):
|
||||
self.data = data
|
||||
self.frequency = frequency
|
||||
self.left = left
|
||||
self.right = right
|
||||
|
||||
|
||||
class HuffmanTree:
|
||||
def __init__(self, data):
|
||||
self.root = None
|
||||
self.char_codes = {}
|
||||
Loading…
Reference in New Issue
Block a user