Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


An educational library of algorithms in Python

Subscribe to updates I use algorithms

Statistics on algorithms

Number of watchers on Github 2769
Number of open issues 27
Average time to close an issue 26 days
Main language Python
Average time to merge a PR about 2 months
Open pull requests 31+
Closed pull requests 33+
Last commit over 2 years ago
Repo Created about 7 years ago
Repo Last Updated over 1 year ago
Size 1.82 MB
Organization / Authornryoung
Page Updated
Do you use algorithms? Leave a review!
View open issues (27)
View algorithms activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating algorithms for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)


.. image:: :target:

.. image:: :target:

.. image:: :target:

.. image:: :target:

Algorithms is a library of algorithms and data structures implemented in Python.

The main purpose of this library is to be an educational tool. You probably shouldn't use these in production, instead, opting for the optimized versions of these algorithms that can be found else where.

You should totally check out the docs_ for implementation details, complexities and further info.


If you want to use the algorithms in your code it is as simple as:


from algorithms.sorting import bubble_sort

my_list = bubble_sort.sort(my_list)


  • Pseudo code, algorithm complexities and futher info with each algorithm.
  • Test coverage for each algorithm and data structure.
  • Super sweet documentation_.


Installation is as easy as:


$ pip install algorithms


Pytest is used as the main test runner and all Unit Tests can be run with:


$ ./


Contributions are always welcome. Check out the contributing guidelines to get started.

.. _docs: .. _documentation:

algorithms open issues Ask a question     (View All Issues)
  • about 4 years Add a changelog
  • about 4 years Create contributing guidelines
algorithms open pull requests (View All Pulls)
  • Missing tests - Adding two missing tests and re-ordering existing tests.
  • Add Suffix and LCP arrays algorithms
  • fix kmp compute_prefix
  • Using Size() method to check if stack is empty , removed unnecessary class variable declaration
  • Implement ternary search
  • Remove unnecessary Queue class variable
  • Added key item to the description of the inputs
  • fix error for removing not existing node in single linked list
  • Added more Singly Linked List operations
  • change shell sort gap len(seq) // 2
  • Fix spelling errors in documentation
  • Correct spelling error in documentation
  • comment header typo
  • Hashtable
  • Update
  • details
  • Fixing typo on LCS
  • Graphs algorithms
  • Added function peek
  • Add min/max heap data structures
  • double link list
  • added Binary Indexed Tree for range sum queries
  • Added interpolation search algorithm with unit tests
  • KMP algorithm incorrect for overlapping matches
  • change /3 to /3.0
  • remove bfs and dfs from todo list
  • Skip list
  • Add fixed seed to random tests
  • pure master
  • Interval tree
  • Addition of GUI implementetion
algorithms questions on Stackoverflow (View All Questions)
  • ANN algorithms for optimal path searching
  • Shape recognition algorithms/code for Java
  • Big o notation as not a good scale of some algorithms
  • Is it possible to convert all backtracking algorithms in to dynamic programming approach?
  • Algorithms - Find duration of overlapping intervals in a cyclic world (24 hours)
  • What is the best book to learn about algorithms?
  • Learning Algorithms on myself, how do you implement tuples in java?
  • Linear algebra algorithms example
  • How do you calculate the value of N for similar efficiency in running time algorithms?
  • Algorithm: What are the algorithms for hotel room reservation?
  • Crossover algorithms for permutation matrices
  • Algorithms to compare 2 paragraphs using stanford-nlp
  • Generic collection algorithms in C#
  • algorithms: how do divide-and-conquer and time complexity O(nlogn) relate?
  • Is there any JavaScript libraries for graph operations and algorithms?
  • Minimum number of training examples for Find-S/Candidate Elimination algorithms?
  • How to get tighter bounds for Backtracking algorithms?
  • "On-line" (iterator) algorithms for estimating statistical median, mode, skewness, kurtosis?
  • Sorting Algorithms Stability Proof
  • Algorithms crash when processing large amounts of data in array
  • Algorithms for searching all possible combinations of a set of data
  • Compression algorithms for a sequence of integers
  • Passing function objects into std algorithms by reference
  • How do encryption algorithms know if they have the right key
  • Data Types and Machine Learning Algorithms in Sklearn
  • Dictionary Database Size - Which algorithms and strategies make it so light?
  • What's the mostly used algorithm among page replacement algorithms in operating systems?
  • Implementing algorithms using python
  • How to know what are the algorithms implemented in llvm framework?
  • How to implement a dynamic programming algorithms to TSP in Python?
algorithms list of languages used
Other projects in Python