I'm trying to write a program in c for Huffman coding, but I am stuck. For input I have:Sample input:4      // here I scan how many letters I haveA 00   // and for everyone I scan how they are coded in string downB 10     C 01D 11001010010101001011010101010110011000 //this is a suboptimal huffman codeSo first I have to decode this string, and to find out how many times every letter         appear. And I already do that. But now I have to find out how many bits have every letter using huffman tree, and in the output I have to print the average bit per symbol.The output for this example here have to be:Sample output1.722So now, how to find out how many bits have every letter with huffman coding?
How do I find average bits per symbol using huffman code?
compression;huffman encoding