-
-
Notifications
You must be signed in to change notification settings - Fork 46k
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
Added Huffman Coding Algorithm #798
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alik604
approved these changes
May 11, 2019
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.
looks good to me
AnupKumarPanwar
approved these changes
May 13, 2019
Awingfu
added a commit
to Awingfu/Python
that referenced
this pull request
May 22, 2019
* Added naive string search algorithm (TheAlgorithms#715) * Organize graph algorithms (TheAlgorithms#719) * organized graph algorithms * all graph algorithms in Graphs/ folder * all graph algorithms are in one folder * Rename number theory/factorial_python.py to maths/factorial_python.py * Added extended euclidean algorithm (TheAlgorithms#720) * Added extended euclidean algorithm * Fixed extended euclidean algorithm * fix comma spelling from coma to comma (TheAlgorithms#722) * Delete Maths/find_hcf.py (TheAlgorithms#636) * fixed balanced_parentheses, Added infix-prefix & postfix evaluation (TheAlgorithms#621) * Create infix_to_prefix_conversion.py * Create postfix_evaluation.py * Update balanced_parentheses.py * Update heap.py (TheAlgorithms#726) Added comments for the better understanding of heap. * Update basic_binary_tree.py (TheAlgorithms#725) I have added the comments for better understanding. * Fix '__bool__' method (TheAlgorithms#735) The method returns the truth when the stack is empty * added wiggle_sort.py (TheAlgorithms#734) * Wiggle_sort * Rename Wiggle_Sort to wiggle_sort.py * Create Searching in sorted matrix (TheAlgorithms#738) * Create Searching in sorted matrix * Rename Searching in sorted matrix to searching_in_sorted_matrix.py * reduce indentation (TheAlgorithms#741) * More matrix algorithms (TheAlgorithms#745) * added matrix minor * added matrix determinant * added inverse,scalar multiply, identity, transpose * Bitmasking and DP added (TheAlgorithms#705) * Added Trafid Cipher (TheAlgorithms#746) * Create is_Palindrome (TheAlgorithms#740) * Update basic_binary_tree.py (TheAlgorithms#748) * feature to add input (TheAlgorithms#749) * Add lowest common ancestor to data structures (TheAlgorithms#732) * add longest common ancestor in data structures * add lowest common ancestor to data structures * implementation of tower_of_hanoi algorithm (TheAlgorithms#756) * Add animation for heap sort * Updated Euler problem 21 sol1.py * Rename is_Palindrome to is_Palindrome.py (TheAlgorithms#752) * Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (TheAlgorithms#763) * Renaming directories * Adding a recursive factorial algorithm * Created a generalized algo to edmonds karp (TheAlgorithms#724) Edmonds Karp algorithm is traditionally with only one source and one sink. What do you do if you have multiple sources and sinks? This algorithm is a generalized algorithm that regardless of however many sinks and sources you have, will allow you to use this algorithm. It does this by using the traditional algorithm but adding an artificial source and sink that allows with "infinite" weight. * variable in function should be lowercase (TheAlgorithms#768) * Adding quick sort where random pivot point is chosen (TheAlgorithms#774) * Added an O(1) solution to problem 002 (TheAlgorithms#776) * Added an O(1) solution to problem 002 * Removed comments from sol3.py that were accidentally added to sol4.py * Update README.md * Update Directed and Undirected (Weighted) Graph.py * update 'sorted' to 'ascending sorted' in comments (TheAlgorithms#789) To avoid confusion all 'sorted' to 'ascending sorted' in comments * fix: replaced outdated url (TheAlgorithms#791) http://www.lpb-riannetrujillo.com/blog/python-fractal/ moved to http://www.riannetrujillo.com/blog/python-fractal/ * add-binary-exponentiation (TheAlgorithms#790) * [FIX] maths/PrimeCheck (TheAlgorithms#796) Current implementation is buggy and hard to read. * Negative values were raising a TypeError due to `math.sqrt` * 1 was considered prime, it is not. * 2 was considered not prime, it is. The implementation has been corrected to fix the bugs and to enhance readability. A docstring has been added with the definition of a prime number. A complete test suite has been written, it tests the 10 first primes, a negative value, 0, 1 and some not prime numbers. closes TheAlgorithms#795 * Update README.md * Added page-rank algorithm implementation (TheAlgorithms#780) * Added page-rank algorithm implementation * changed init variables * Added Huffman Coding Algorithm (TheAlgorithms#798) * More elegant coding for merge_sort_fastest (TheAlgorithms#804) * More elegant coding for merge_sort_fastest * More elegant coding for merge_sort * Fix typo (TheAlgorithms#806) * added eulerian path and circuit finding algorithm (TheAlgorithms#787) * enhancement (TheAlgorithms#803) * Update graph.py (TheAlgorithms#809) * Implement check_bipartite_graph using DFS. (TheAlgorithms#808) * Use ==/!= to compare str, bytes, and int literals (TheAlgorithms#767) * Travis CI: Add more flake8 tests * Use ==/!= to compare str, bytes, and int literals ./project_euler/problem_17/sol1.py:25:7: F632 use ==/!= to compare str, bytes, and int literals if i%100 is not 0: ^ * Use ==/!= to compare str, bytes, and int literals * Update sol1.py * Created shortest path using bfs (TheAlgorithms#794) * Created shortest path using bfs * Interpolation search - fix endless loop bug, divide 0 bug and update description (TheAlgorithms#793) * fix endless loop bug, divide 0 bug and update description fix an endless bug, for example, if collection = [10,30,40,45,50,66,77,93], item = 67. fix divide 0 bug, when right=left it is not OK to point = left + ((item - sorted_collection[left]) * (right - left)) // (sorted_collection[right] - sorted_collection[left]) update 'sorted' to 'ascending sorted' in description to avoid confusion * delete swap files * delete 'address' and add input validation * Update bucket_sort.py (TheAlgorithms#821) * Some simplification * Add NQueens backtracking search implementation (TheAlgorithms#504) * fix spelling on line 44 of bucket sort (TheAlgorithms#824) * change besd to best * Removed the (incorrectly named) redundant file graph_list.py and renamed graph.py to graph_list.py (TheAlgorithms#820) * fix empty list validation and code data structures (TheAlgorithms#826) * fix empty list validation and code data structures * Update bucket_sort.py TheAlgorithms#826 (review)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implemented Huffman Coding, taught in courses as a basic compression algorithm.