Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fengsp/pyalgorithms

Algorithms in Python
https://github.com/fengsp/pyalgorithms

Last synced: about 2 months ago
JSON representation

Algorithms in Python

Awesome Lists containing this project

README

        

###Python Algorithms

![Al-Khwarizmi](http://www.biologie.uni-hamburg.de/b-online/library/history/alk.gif)


ComplexityNameExamples


Θ(1)ConstantHash table lookup and modification(dict).


Θ(lg n)LogarithmicBinary search.


Θ(n)LinearIterating over a list.


Θ(nlg n)LoglinearOptimal sorting of arbitrary values.


Θ(n**2)QuadraticComparing n objects to each other.


Θ(n**3)CubicFloyd and Warshall’s algorithms.


O(n**k)Polynomialk nested for loops over n.


Ω(k**n)ExponentialProducing every subset of n items.


Θ(n!)FactorialProducing every ordering of n values.