Some error occured while loading page for you. Please try again.
You are viewing a single comment's thread. Return to all comments →
You don't have to input anything. It is a function only submission. The input is handled by the main program. You just need to implement the function as described in the problem.
The input string while running the demo test case is displayed as "ABACA". Shouldn't this be "1001011"?
Your function will receive the encoded string and the root to the huffman tree only. This input is being used to generate the huffman tree and the encrypted string which will be sent as a parameter to the decode_huff function.
Dude please check the input. The input and output are same : ABACA.
I'm still having the same problem, you haven't fixed anything.
I'm having the same problem with Python 2. If I just implement the function:
def decodeHuff(root , s):
Your code did not pass this test case.
Your Output (stdout)
~ no response on stdout ~
The comment above the function is also confusing - it asks for input from STDIN, but the input is from s.
I figured it out, the input through STDIN IS ABACA but it goes into another function that isn't shown which actually creates the huffman tree and then passes the encoded string into the function's input, which is read in binary.