Click here to Skip to main content
15,893,486 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi, guys. I was wondering if you can help me with my homework. I am currently an undergraduate Software Engineering student.
Huffman Code [Problem Description] For an English article, the frequency of occurrence of 26 lowercase letters are counted, and then they are encoded by Hoffman code. [Basic Requirements] 1) Read the original text file from the file and display the text on the screen.. 2) Output the number of occurrences of 26 English lowercase letters, and the corresponding encoding. THE ORIGINAL TEXT file contains: ahfsgdfdjgkjhkdhdkjgdhfagsfgdjsfdkjshdklsjdlkdkjgkjgdfhjgshfjdjkdfkjlkhlklsjksdjgdsfgsfa

What I have tried:

I can't came up with anything.
Posted
Updated 5-Dec-18 3:25am

Quote:
I can't came up with anything.
Sorry we do not provide a homework writing service. If you do not understand the problem then you should discuss with your teacher.
 
Share this answer
 
If you don't understand the algorithm then please read the original Huffman's article, it is very well explained.
Using C++ would make your task simpler (for instance make_heap[^] is gently provided by the C++ standard library).
Try harder and post only specific questions here.
 
Share this answer
 
Quote:
How to code huffman code for duplicated alphabets in C?

There is no duplicated alphabet in the question, or you need to define what it means to you.
Quote:
I can't came up with anything.

It is just not possible, or you need to talk seriously with your teacher.
You need to think about the requirement and list the tasks to do in order for each part of requirement.
See which task you can solve and which ones you can't.
show your work and ask specific questions.

We do not do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them.
Any failure of you will help your teacher spot your weaknesses and set remedial actions.
Any failure of you will help you to learn what works and what don't, it is called 'trial and error' learning.
So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900