Leaderboard
Showing:
Huffman Decoding-1
Easy Accuracy: 67.92% Submissions: 5199 Points: 2

Given a string S, implement Huffman Encoding and Decoding.

Example 1:

Input : abc
Output : abc

Example 2: 

Input : geeksforgeeks
Output : geeksforgeeks

 

Your task: 
You don't need to read input or print anything. Your task is to complete the function decode_file(), which takes root of the tree formed while encoding and the encoded string as the input parameters and returns the decoded string.

 

Constraints:
2<=S<=1000

 

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.

Huffman Decoding-1

Output Window