https://github.com/laserphaser/python-algorithms
Algorithms and data structures in Python
https://github.com/laserphaser/python-algorithms
algorithms datastructures graph graph-algorithms greedy-algorithms python python3 sorting-algorithms
Last synced: 5 months ago
JSON representation
Algorithms and data structures in Python
- Host: GitHub
- URL: https://github.com/laserphaser/python-algorithms
- Owner: LaserPhaser
- License: mit
- Created: 2016-12-03T08:18:25.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-07-12T15:54:41.000Z (over 4 years ago)
- Last Synced: 2025-06-05T06:31:58.671Z (7 months ago)
- Topics: algorithms, datastructures, graph, graph-algorithms, greedy-algorithms, python, python3, sorting-algorithms
- Language: Python
- Homepage:
- Size: 118 KB
- Stars: 3
- Watchers: 0
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
|Build Status| |Coverage Status| |Maintainability| |Codacy| |Documentation Status|
python-algorithms
=================
python-algorithms project is a collection of algorithms and datastructures implemented on
``Python3.6`` You don’t need to install these project as a module (via
pip) because usually you just need only one algorithm instead of all
pack, so just copy and paste the source code. For easy navigation please
use links to the source code below.
Algorithms:
-----------------------
Arithmetic
~~~~~~~~~~
- `GCD [Greatest Common Divisor] `__
- `LCM [Least Common Multiple] `__
Greedy
~~~~~~
- `Covering segments `__
- `Fractional knapsack `__
Search
~~~~~~
- `Binary search `__
- `Closest pair `__
- `Fibonacci [Recursive method] `__
- `Fibonacci by Modulo [with Pisano period] `__
- `Rabin-Karp algorithm `__
Sorting
~~~~~~~
- `Merge sort `__
- `Quick sort with [Dutch National Flag Algorithm] optimization `__
Algorithms on Graphs
~~~~~~~~~~~~~~~~~~~~
- `DFS (Depth first search) `__
- `BFS (Breadth first search) `__
- `Dijkstra (priority queue) `__
- `Bidirectional Dijkstra (priority queues) `__
- `Cycle detection (DFS) `__
- `SCC (Strongly connected components) `__
- `Topological Sort `__
- `Bipartite `__
- `Bellman-Ford algorithm (negative cycle detection) `__
- Kruskal algorithm for connecting points
- A* (potential function - euclidean distance)
- `BST checker `__
Dynamic Programming
~~~~~~~~~~~~~~~~~~~
- `Knapsack `__
Datastructures:
---------------
- `Hash chain `__
Unsorted:
---------
- Tree traversal methods (in/pre/post order recursive and iterative)
- Rope data structure (heavyweight strings based on splay tree with
iterative in order traversal)
.. |Build Status| image:: https://travis-ci.org/ArseniyAntonov/python-algorithms.svg?branch=master
:target: https://travis-ci.org/ArseniyAntonov/python-algorithms
.. |Documentation Status| image:: https://readthedocs.org/projects/python-algorithms-doc/badge/?version=latest
:target: http://python-algorithms-doc.readthedocs.io/en/latest/?badge=latest
.. |Coverage Status| image:: https://codecov.io/gh/ArseniyAntonov/python-algorithms/branch/master/graph/badge.svg
:target: https://codecov.io/gh/ArseniyAntonov/python-algorithms
.. |Maintainability| image:: https://api.codeclimate.com/v1/badges/b911a106363fd033ed21/maintainability
:target: https://codeclimate.com/github/ArseniyAntonov/python-algorithms/maintainability
.. |Codacy| image:: https://api.codacy.com/project/badge/Grade/dbe5942aa3b44a4588346ea757c494de
:target: https://www.codacy.com/app/ArseniyAntonov/python-algorithms?utm_source=github.com&utm_medium=referral&utm_content=ArseniyAntonov/python-algorithms&utm_campaign=Badge_Grade