https://github.com/fengsp/pyalgorithms
Algorithms in Python
https://github.com/fengsp/pyalgorithms
Last synced: 4 months ago
JSON representation
Algorithms in Python
- Host: GitHub
- URL: https://github.com/fengsp/pyalgorithms
- Owner: fengsp
- License: other
- Created: 2014-04-07T05:11:41.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-06-30T09:13:43.000Z (about 11 years ago)
- Last Synced: 2025-01-07T00:53:54.758Z (6 months ago)
- Language: Python
- Homepage:
- Size: 215 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
###Python Algorithms

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.