-
-
Notifications
You must be signed in to change notification settings - Fork 155
Adding Huffman Code in DSA folder #3489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
## Fixing Issue codeharborhub#3380 ## Description This pull request implements the Huffman Coding algorithm in C++. Huffman Coding is a lossless data compression algorithm that assigns variable-length codes to input characters based on their frequencies, resulting in efficient compression. ## Type of PR - [ ] Bug fix - [x] Feature enhancement - [ ] Documentation update - [ ] Security enhancement - [ ] Other (specify): _______________ ## Checklist - [x] I have performed a self-review of my code. - [x] I have read and followed the Contribution Guidelines. - [x] I have tested the changes thoroughly before submitting this pull request. - [x] I have provided relevant issue numbers, screenshots, and videos after making the changes. - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have followed the code style guidelines of this project. - [x] I have checked for any existing open issues that my pull request may address. - [x] I have ensured that my changes do not break any existing functionality. - [ ] Each contributor is allowed to create a maximum of 4 issues per day. This helps us manage and address issues efficiently. - [x] I have read the resources for guidance listed below. - [x] I have followed security best practices in my code changes. ## Additional Context The Huffman Coding algorithm is widely used in data compression applications, making it a valuable addition to our DSA folder. The implementation includes functionalities for building the Huffman tree, generating codes, and encoding/decoding text. ## Resources for Guidance Please read the following resources before submitting your contribution: - [x] [Code Harbor Hub Community Features](https://www.codeharborhub.live/community/features) - [x] [Markdown Guide](https://www.markdownguide.org/)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, @sjain1909! 🎉 Thank you for submitting your pull request to CodeHarborHub. We appreciate your contribution and enthusiasm! Our team will review it soon. If you have any questions or need further assistance, feel free to reach out. Thanks for contributing!
Here's the code health analysis summary for commits Analysis Summary
|
@ajay-dhangar sir, kindly review and let me know if any changes required. |
⚡️ Lighthouse Report for the Deploy Preview of this PR 🚀🔗 Site: CodeHarborHub | Live Site
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated your code based on our needs like
The code is well organized and easy to follow. It demonstrates a solid understanding of Huffman coding and its implementation. It includes detailed comments, which enhance code readability and make it easier for others to understand.
The provided code does not include any tests. Writing tests is an important aspect of development and helps ensure the code is working as expected. I recommend adding tests for this implementation to make it more robust and reliable.
Overall, this is a well-written and informative implementation of Huffman coding. With the addition of tests, it would be even more impressive.
So, if you want to write content for next time to make sure you follow our Guidelines for Writing DSA Problem Solutions
Fixing Issue
Fix #3380
Description
This pull request implements the Huffman Coding algorithm in C++. Huffman Coding is a lossless data compression algorithm that assigns variable-length codes to input characters based on their frequencies, resulting in efficient compression.
Type of PR
Checklist
Additional Context
The Huffman Coding algorithm is widely used in data compression applications, making it a valuable addition to our DSA folder. The implementation includes functionalities for building the Huffman tree, generating codes, and encoding/decoding text.
Resources for Guidance
Please read the following resources before submitting your contribution: