Share, discuss and learn about algorithm implementations!
Lua Java C# Python Go C Other
Latest commit 1e557fc Mar 27, 2017 @kennyledet committed on GitHub Merge pull request #511 from pravsingh/master
pushing back the latest changes to the main-main Repo
Permalink
Failed to load latest commit information.
100_Doors_Problem Added BogoSort C++ Implementation (#510) Mar 27, 2017
10_Harshad_Number Added BogoSort C++ Implementation (#510) Mar 27, 2017
99_Bottles_Problem puzzle 10 harshad number and 99 bottles problem added, and tag of har… Oct 4, 2015
A_Star_Search used fix_tag_files.py to fix tags Jun 8, 2014
Ackermann Added BogoSort C++ Implementation (#510) Mar 27, 2017
Alpha_Beta_Pruning used fix_tag_files.py to fix tags Jun 8, 2014
Average Added BogoSort C++ Implementation (#510) Mar 27, 2017
Bellman_Ford_Search Added BogoSort C++ Implementation (#510) Mar 27, 2017
Best_First_Search used fix_tag_files.py to fix tags Jun 8, 2014
Binary_Search Add test file Aug 9, 2015
Binary_Search_Tree Added BogoSort C++ Implementation (#510) Mar 27, 2017
Bloom_Filter/Python/argvk bloomfilter py: remove unused variable Feb 21, 2015
Bogobogosort Implemented Bogobogosort in PHP Oct 29, 2015
Bogosort Added BogoSort C++ Implementation (#510) Mar 27, 2017
Boyer_Moore_Horspool Added C# implementation of Boyer-Moore-Horspool Jan 7, 2015
Bozosort Merge pull request #403 from aayushKumarJarvis/master Aug 13, 2014
Breadth_First_Search i hope this works :-) Oct 8, 2014
Brent_Cycle_Detection_Algorithm Added missing tag files May 20, 2014
Bresenham_Based_Supercover_Line used fix_tag_files.py to fix tags Jun 8, 2014
Bresenham_Line used fix_tag_files.py to fix tags Jun 8, 2014
Bubble_Sort Merge pull request #468 from warreee/master Aug 9, 2015
Burrows_Wheeler_Transform used fix_tag_files.py to fix tags Jun 8, 2014
Caesar_Cipher Added BogoSort C++ Implementation (#510) Mar 27, 2017
Catalan_Numbers Added summation way of getting catalan numbers in scala Jun 15, 2014
Chebyshev_distance Merge pull request #415 from aayushKumarJarvis/master Aug 24, 2014
Cocktail_Sort Added BogoSort C++ Implementation (#510) Mar 27, 2017
Collatz_chain Added Stopping Time Aug 18, 2015
Comb_Sort Added missing tag files, made script executable Jun 8, 2014
Convex_hull Implemented Convex Hull in Python Jul 5, 2016
Counterfeit_Coin_Problem README modification Dec 29, 2014
Counting_Sort Implemented Counting Sort in C#, tried to optimize the default implem… Sep 3, 2014
Cryptography Added C# implementation of Cryptography Jan 11, 2015
Dangerous_Content Added missing tag files May 20, 2014
Decimal_To_Fraction Added PHP implementation to convert decimals to fractions Oct 30, 2015
Dekkers_algorithm used fix_tag_files.py to fix tags Jun 8, 2014
Depth_First_Search used fix_tag_files.py to fix tags Jun 8, 2014
Depth_Limited_Search used fix_tag_files.py to fix tags Jun 8, 2014
Derivative used fix_tag_files.py to fix tags Jun 8, 2014
Dijkstra's_Shortest_Path Removed some unnecessary whitespace. Jul 8, 2016
Egyptian_Fractions Added egyptian fractions in scala Jun 15, 2014
Einstein_Puzzle Added Einstein Problem in Haskell Jan 10, 2015
Euclidean_Norm Merge pull request #393 from aayushKumarJarvis/master Aug 7, 2014
Euclidean_algorithm Adden the solution and solution test to euclidean algorithm in C#. Jun 27, 2015
Euclidean_distance Merge pull request #395 from aayushKumarJarvis/master Aug 8, 2014
Expression_Evaluation/Java Added Dijkstra's 2-Stack algo for expression eval Jul 17, 2016
Factorial Added BogoSort C++ Implementation (#510) Mar 27, 2017
Fast_Inv_Sqrt used fix_tag_files.py to fix tags Jun 8, 2014
Fibonacci_series Added C++ fibonacci implementation Feb 19, 2015
Fisher-Yates Updated the Fisher Yates shuffle to use a passed in Rng, the default … Aug 18, 2014
FizzBuzz Added BogoSort C++ Implementation (#510) Mar 27, 2017
Floyd_Cycle_Detection_Algorithm Added missing tag files May 20, 2014
Floyd_Warshall Added floyd_warshall Ruby Apr 6, 2015
Gale_Shapely Updated tests Jan 27, 2014
Gauss_Seidel_Algorithm used fix_tag_files.py to fix tags Jun 8, 2014
Gnome_sort Merge pull request #401 from aayushKumarJarvis/master Aug 13, 2014
Golden_Ratio_Algorithms used fix_tag_files.py to fix tags Jun 8, 2014
Hamming_Code Added BogoSort C++ Implementation (#510) Mar 27, 2017
Hamming_Distance Rm ghost folder Aug 22, 2016
Hamming_Weight Added Hamming Weight in Lua Jan 7, 2014
Happy_Number Ackermann and happy numbers added in C++. Oct 27, 2015
Hash_Table/C++/mike168m Added BogoSort C++ Implementation (#510) Mar 27, 2017
Heap_Sort Changed to full adjectives Oct 14, 2015
HuffmanCoding Added tag files for currently existing algorithm Jan 4, 2014
Insertion_Sort i hope this works :-) Oct 8, 2014
Interesection_of_Points Adding Problem statement for checking intersection of two points Aug 18, 2014
Iterative_Deepening_Depth_First_Search used fix_tag_files.py to fix tags Jun 8, 2014
Johnson_Search Added Johnson's algorithm. Jun 17, 2014
Josephus_Problem Added iterative solution of josephus problem in ruby Apr 7, 2015
KMeans_Clustering used fix_tag_files.py to fix tags Jun 8, 2014
Knapsack used fix_tag_files.py to fix tags Jun 8, 2014
Knuth_Morris_Pratt Fixed tab/4-spaces issues. Jul 11, 2016
Kruskal_Minimum_Spanning_Tree Added Kruskal's algorithm. Jun 17, 2014
Lamport_Logical_Clock_synchronization/Go/sjs7007 Added BogoSort C++ Implementation (#510) Mar 27, 2017
Lempel_Ziv_Welch fix LZW decode error Jun 26, 2014
Levenshtein_distance Added Test Classes Aug 15, 2015
Linear_Search Merge pull request #401 from aayushKumarJarvis/master Aug 13, 2014
Longest_Palindrome/Objective-C Add longest palindrome Aug 9, 2015
Mandelbrot_Set Updates May 27, 2014
Manhattan_distance .. Jun 8, 2014
Markov-Chain used fix_tag_files.py to fix tags Jun 8, 2014
Maximum_Subarray Added type signature to test method Jun 19, 2014
Memoization Added Javascript solution to the n-queen problem Aug 13, 2014
Merge_Sort Merge pull request #461 from TarangKhanna/master Aug 27, 2015
Minimax used fix_tag_files.py to fix tags Jun 8, 2014
Minkowski_distance used fix_tag_files.py to fix tags Jun 8, 2014
Monty_Hall_Problem added ruby implementation Raul Jordan of monty hall Jan 7, 2015
Move_To_Front_Transform used fix_tag_files.py to fix tags Jun 8, 2014
N_Queens_Problem Added BogoSort C++ Implementation (#510) Mar 27, 2017
Negamax used fix_tag_files.py to fix tags Jun 8, 2014
Newton_Raphson used fix_tag_files.py to fix tags Jun 8, 2014
Palindrome Merge branch 'master' of https://github.com/kennyledet/Algorithm-Impl… Aug 8, 2016
Partial_Selection_Sort Added missing tag files May 20, 2014
Patience_Sort Fix dir structure for PatienceSort Aug 22, 2016
Pi_Algorithms Added missing tag files May 20, 2014
Playfair_Cipher/Go/sjs7007 Added BogoSort C++ Implementation (#510) Mar 27, 2017
Pollard_Rho_Algorithm Added default pollard's rho Jun 28, 2014
Polynomial_Operations/Java/aayushKumarJarvis Adding new problem statement of Polynomial based functions Aug 13, 2014
Prim_Minimum_Spanning_Tree Add test file from prim mst algorithm Aug 8, 2015
Quick_Sort Merge pull request #389 from aayushKumarJarvis/master Jul 25, 2014
ROT13_Cipher Added C# implementation of ROT13 Jan 7, 2015
ROT47_Cipher Added missing tag files, made script executable Jun 8, 2014
Rabin_Karp used fix_tag_files.py to fix tags Jun 8, 2014
Radix_Sort used fix_tag_files.py to fix tags Jun 8, 2014
Rail_Fence_Cipher Created "Rail Fence Cipher" with C# implementation Jan 9, 2015
Ranrot-B-Pseudo_Random_Number_Generator Fixed Go names, so that funcs are actually exported. Jun 18, 2014
Roman_Numerals Added C# implementation of Roman Numerals Jan 7, 2015
Run_Length_Encoding used fix_tag_files.py to fix tags Jun 8, 2014
Selection_Sort Added comment to selection sort Jan 26, 2015
Self_Descriptive_Number Added Self-Descriptive-Number in Python Jun 29, 2014
Shell_Sort Merge pull request #387 from aayushKumarJarvis/master Jul 25, 2014
Sieve_of_Eratosthenes Heapsort and Sieve of Eratosthenes in Scala Oct 13, 2015
Simplex_Method/Java/mike168m Added BogoSort C++ Implementation (#510) Mar 27, 2017
Stat_Mode used fix_tag_files.py to fix tags Jun 8, 2014
Stooge_Sort Stooge Sort Java Implementation Aug 20, 2015
Stop_Words Fix dir structure for Stop Words Aug 22, 2016
String_to_int string-to-int funtionality in c++ Oct 21, 2015
Successive_Over_Relaxation used fix_tag_files.py to fix tags Jun 8, 2014
Sudoku Add documentation for solution Mar 5, 2015
Symmetric_Difference Added missing tag files, made script executable Jun 8, 2014
The_Twelve_Days_Of_Xmas Added BogoSort C++ Implementation (#510) Mar 27, 2017
Thompsons_Construction_Algorithm used fix_tag_files.py to fix tags Jun 8, 2014
Token_Bucket Added tag files for currently existing algorithm Jan 4, 2014
Tokenization Added missing tag files, made script executable Jun 8, 2014
Towers_Of_Hanoi Added Towers of Hanoi in C Dec 31, 2014
Tries Added own Trie Nov 20, 2014
Tug_Of_War Added Tug of War algorithm in Go (#503) Mar 27, 2017
Union_Find_Algorithm Added BogoSort C++ Implementation (#510) Mar 27, 2017
Vigenere_Cipher Vignere Cipher Java Aug 19, 2015
Warshall used fix_tag_files.py to fix tags Jun 8, 2014
Weighted_Random_Distribution used fix_tag_files.py to fix tags Jun 8, 2014
.gitignore Added BogoSort C++ Implementation (#510) Mar 27, 2017
LICENSE Added license. Fixed #164 Jan 7, 2014
README.md Add Unit Test Discussion References To The README Aug 10, 2015
add_tag_files.sh Added missing tag files, made script executable Jun 8, 2014
fix_tag_files.py added note to fix_tag_files script Jun 8, 2014

README.md

#Algorithm Implementations

Join the chat at https://gitter.im/kennyledet/Algorithm-Implementations

(Note: there is a backstory on my motivation for starting this at the bottom of this README)

Updates

Update 7/19/15 Please include tests with your implementation submissions! Please see Issue #459 on instructions. Thanks for understanding!! <3

Update 1/4/15 Our site is now getting hundreds of unique visitors and thousands of pageviews per day :)

Algorithm.zone

Update 06/09/14 I have released a native Android app for viewing the algorithms! It's a wrapper around the web app with some native functionality. Check it out on Google Play here Algorithm Implementations Android App

Update 05/09/14: I am working on a web application that will tie things up in a much more fluid way, and help exhibit the algorithms to those who either don't know much about git/github, or just can't be vexed clicking through all the folders. This will open the repo up to a much wider audience in general!

You can see a preview here! Algorithms Implementations Website

Please offer up your suggestions in the Issues section of the Github repository

Update 12/30/13: I have given the 3 top committers (jcla1, PatrickYevsukov, dalleng) collaborator access. This was very well earned, as they have managed to contribute much more to this repo than I have had the time to.

Again, thanks so much for the consistency guys, it is extremely appreciated. It made sense to start with giving these guys collab access for obvious reasons, but I also thank every single person who has even submitted a pull request. Without you all, this repository would be nothing.

Purpose

We see tons of interesting projects that are actively contributed to here on Github. Seriously, it's very powerful.

Unfortunately, I haven't really spotted (a popular and language agnostic) one where people used the power of Git to share, discover, discuss and improve algorithm implementations!

Send us a pull request, and we will add any implementation of any algorithm you have so long as it at least mostly suits the following conventions.

Conventions

  • Language doesn't matter. Just make sure you're implementing an algorithm.

  • Submissions should follow this directory structure

      Algorithm_Name/Language_Name/username/filename.extension
      Algorithm_Name/Language_Name/username/filename_test.extension
    
  • Please include a description of the algorithm you are implementing; it doesn't really matter if it's copied from Wikipedia or not (citations please), but this really does help people who are trying to find new algorithms to implement and contribute by browsing this repository.

  • When implementing a new algorithm, create a "tags" file in the algorithm's root directory and add some appropriate tags

  • Please package your code in a directory bearing your GitHub username. git blame is cool, and has many more appropriate applications, but in this context I'd rather pull a flat list of files and be able to check out everyone's contributions that way than have to look through the revisions.

  • Each algorithm should have its corresponding unit test cases (as directory structure suggested above) which covers the corner cases, happy/unhappy paths. Please see Issue #459 for further discussion on this topic.

    The advantage of doing so is to assert that everything is covered, and that the algorithm is not broken between code changes.

    It also helps newbies to have a quick look at the unit test cases to understand the basic usecase of the algorithm.

  • Documentation inside the code is recommended. This helps others in understanding the code base.

  • Have fun!

Resources

We should also keep a curated list of resources dealing with algorithms.

####Introductory Books

####Sites

####Online Classes

Backstory

I have been "coding" since I was about 12, and have been teaching myself software engineering principles through solving problems in various languages through practice, freelance work and my own projects.

But, you see, it wasn't until a couple of years ago in high school when I started to truly see the light about how languages are merely tools; I basically realized what is common sense to me now - to truly be able to call one's self a proficient programmer, one must go beyond simple syntax slinging and be capable of efficiently solving a much wider subset of problems within computer programming than the average programmer.

Of course, this was merely one of the initial revelations that led to the revelation that ultimately led to this repository.

When I decided to become a Computer Science major, I took the initiative to research actual Computer Science topics, outside of class, as I've always been more of a self-learner.

Lo and behold, CS and practical software engineering turned out to be two entirely different things.

I won't go into my whole journey up til this point in this README, but tl;dr:

There are many problem domains which are simply closed off to the programmer who stagnates in his learning and never studies how to analyze algorithms and develop his own. This is objectively true.

I also have a much greater level of respect towards my profession now, and take it very seriously. I have a relatively rigorous base education roadmap that I've laid out for myself. Even being just a core subset of skills from which I will base subsequently developed skills on, it's quite expansive and diverse. I do not plan on stagnating, ever.

Bitdeli Badge