@@ -7,94 +7,42 @@ Algorithms
7
7
.. image :: http://codecov.io/github/nryoung/algorithms/coverage.svg?branch=master
8
8
:target: http://codecov.io/github/nryoung/algorithms?branch=master
9
9
10
- This is an attempt to build a cohesive module of algorithms in Python.
10
+ Algorithms is a library of algorithms and data structures implemented in Python.
11
11
12
- The purpose of this repo is to be a learning tool for myself and others.
12
+ The main purpose of this library is to be an educational tool. You probably
13
+ shouldn't use these in production, instead, opting for the optimized versions of
14
+ these algorithms that can be found else where.
13
15
14
- I used psuedo code from various sources and I have listed them as references in the source code of each algorithm.
16
+ You should totally check out the docs for implementation details, complexities
17
+ and further info.
15
18
16
- Algorithms implemented so far:
17
- ------------------------------
18
-
19
- **Data Structures: **
20
-
21
- - Queue
22
- - Stack
23
- - Disjoint Set
24
- - Single Linked List
25
- - Undirected Graph
26
- - Digraph
27
-
28
- **Sorting: **
29
-
30
- - Bogo Sort
31
- - Bubble Sort
32
- - Cocktail Sort
33
- - Comb Sort
34
- - Heap Sort
35
- - Insertion Sort
36
- - Merge Sort
37
- - Quick Sort
38
- - In Place Quick Sort
39
- - Selection Sort
40
- - Shell Sort
41
- - Gnome Sort
42
- - Strand Sort
43
-
44
- **Searching: **
45
-
46
- - Binary Search
47
- - Boyer-Moore-Horspool
48
- - Knuth-Morris-Pratt
49
- - Rabin-Karp
50
- - Depth First Search (Recursive)
51
- - Breadth First Search (Iterative)
52
-
53
- **Shuffling: **
54
-
55
- - Knuth/Fisher-Yates Shuffle
56
-
57
- **Math: **
19
+ Usage
20
+ -----
58
21
59
- - Extended GCD
60
- - Standard Normal Probability Density Function
61
- - Cumulative Density Function (Approximation; 16 digit precision for 300 iter.)
62
- - Sieve of Eratosthenes
22
+ If you want to use the algorithms in your code it is as simple as:
63
23
64
- ** Dynamic Programming: **
24
+ ::
65
25
66
- - Longest Common Subsequence
26
+ from algorithms.sorting import bubble_sort
67
27
68
- ** Random: **
28
+ my_list = bubble_sort.sort(my_list)
69
29
70
- - Mersenne Twister
30
+ Features
31
+ --------
71
32
33
+ - Pseudo code, algorithm complexities and futher info with each algorithm.
34
+ - Test coverage for each algorithm and data structure.
35
+ - Super sweet documentation.
72
36
73
37
Installation:
74
38
-------------
75
39
76
- If you want to use the algorithms directly, simply
40
+ Installation is as easy as:
77
41
78
42
::
79
43
80
44
$ pip install algorithms
81
45
82
- If you want to examine the algorithms source, then you should clone this repo.
83
-
84
- Usage:
85
- ------
86
-
87
- Once installed you can simply do the following in your program:
88
-
89
- ::
90
-
91
- from algorithms.sorting import bubble_sort
92
-
93
- my_list = bubble_sort.sort(my_list)
94
-
95
-
96
- All prequisites for the algorithms are listed in the source code for each algorithm.
97
-
98
46
99
47
Tests:
100
48
------
@@ -109,16 +57,5 @@ Pytest is used as the main test runner and all Unit Tests can be run with:
109
57
Contributing:
110
58
-------------
111
59
112
- If there is an algorithm or data structure that you do not see, but would like to add please feel free to do a pull request. I only ask two things:
113
-
114
- 1. For each algorithm and data structure you implement please have corresponding unit tests to prove correctness.
115
- 2. Please make sure that your module follows similar style guidelines that are laid out in the other modules.
116
-
117
- I want to personally thank everybody that has contributed so far and your names will be added to `AUTHORS.rst `.
118
-
119
-
120
- TODO:
121
- -----
122
- See `TODO.rst `_.
123
-
124
- .. _`TODO.rst` : TODO.rst
60
+ Contributions are always welcome. Check out the contributing guidelines to get
61
+ started.
0 commit comments