We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
importsysdefdecodeHuff(root,s):#Enter Your Code Herei=0s=s+'$'while(s[i]!='$'):temp=rootwhileTrue:c=int(s[i])i=i+1ifc==0:temp=temp.leftiftemp.data!='\0':sys.stdout.write(temp.data)breakelifc==1:temp=temp.rightiftemp.data!='\0':sys.stdout.write(temp.data)break
Tree: Huffman Decoding
You are viewing a single comment's thread. Return to all comments →
My code in python