You are viewing a single comment's thread. Return to all comments →
My Python Solution:
def decodeHuff(root, s): empty = root.data cur = root for i in s: if i == "1": cur = cur.right else: cur = cur.left if cur.data != empty: print(cur.data, end="") cur = 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 →
My Python Solution: