/algorithm-yoga

Some classic algorithms implemented in Python 2.7

Primary LanguagePythonApache License 2.0Apache-2.0

Algorithm-yoga

This is a collection of some fundamental algorithms in Python 2.7. At the moment around one third of the planned algorithms are implemented.

Currently the following algorithms can be used:

graphs

- Connected Components in an undirected graph
- Strongly Connected Components in a directed graph
- Find cycles in a 
- Generate random directed graph
- Generate random undirected graph

strings

- Rabin-Karp pattern mathing
- Hash function

sorting

- selection sort (both with and without recursion)
- insertion sort (both with and without recursion)

miscellaneous

- binary search
- list rotation
- uniq on lists