You are viewing a single comment's thread. Return to all comments →
python 3.x
def decodeHuff(root, s): ans='' curr=root for i in range(0,len(s)): if(s[i]=='0'): curr=curr.left else: curr=curr.right if(curr.left== None and curr.right== None): ans=ans+curr.data curr=root print(ans)
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.x