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.
It is just a translation of tom_linteau's solution which is in java.
it is acording to me very short an sipmle to understand.
Hier is it in python
defdecodeHuff(root,s):#Enter Your Code Herecurr=rootforiinrange(0,len(s)):ifs[i]=='0':curr=curr.leftelse:curr=curr.rightifcurr.leftisNoneandcurr.rightisNone:print(curr.data,end='')curr=root
Cookie support is required to access HackerRank
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 Solution
It is just a translation of tom_linteau's solution which is in
java
. it is acording to me very short an sipmle to understand.Hier is it in
python