You are viewing a single comment's thread. Return to all comments →
Python 3 Solution
def decodeHuff(root, s): n = root for l in s: if l == "0": n = n.left elif l == "1": n = n.right if n.left == None and n.right == None: print(n.data, end="") n = root
Seems like cookies are disabled on this browser, please enable them to open this website
Tree: Huffman Decoding
You are viewing a single comment's thread. Return to all comments →
Python 3 Solution