@@ -12,45 +12,51 @@ Quick Start Guide
1212 # import the required sort
1313 from pygorithm.sorting import bubble_sort
1414
15- myList = [12 , 4 , 2 , 14 , 3 , 7 , 5 ]
15+ my_list = [12 , 4 , 2 , 14 , 3 , 7 , 5 ]
1616
17- # to sort the list
18- sorted_list = bubble_sort.sort(myList )
17+ # to sort the _list
18+ sorted__list = bubble_sort.sort(my_list )
1919
2020 Features
2121--------
2222
23- * Sorts available:
24- - Bubble Sort (bubble_sort)
25- - Selection Sort (selection_sort)
26- - Insertion Sort (insertion_sort)
27- - Merge Sort (merge_sort)
28- - Quick Sort (quick_sort)
29- - Bucket Sort (bucket_sort)
30- - Counting Sort (counting_sort)
31- - Heap Sort (heap_sort)
32- - Shell Sort (shell_sort)
33-
34- * To see all the available functions in a module there is a `modules() ` function available. For example,
23+ * To see all the available functions in a module, you can just type ``help() `` with the module name as argument. For example,
3524
3625.. code :: python
3726
38- >> > from pygorithm.sorting import modules
39- >> > modules.modules()
40- [' bubble_sort' , ' bucket_sort' , ' counting_sort' , ' heap_sort' , ' insertion_sort' , ' merge_sort' , ' quick_sort' , ' selection_sort' , ' shell_sort' ]
27+ >> > from pygorithm import sorting
28+ >> > help (sorting)
29+ Help on package pygorithm.sorting in pygorithm:
30+
31+ NAME
32+ pygorithm.sorting - Collection of sorting methods
33+
34+ PACKAGE CONTENTS
35+ bubble_sort
36+ bucket_sort
37+ counting_sort
38+ heap_sort
39+ insertion_sort
40+ merge_sort
41+ modules
42+ quick_sort
43+ selection_sort
44+ shell_sort
45+ >> > from pygorithm.sorting import bubble_sort
46+ >> > help (bubble_sort)
4147
4248 * For sorting:
43- Remember ``sort() `` function takes its parameter as a list only.
49+ Remember ``sort() `` function takes its parameter as a _list only.
4450
4551.. code-block :: python
4652
4753 # import the required sort
4854 from pygorithm.sorting import bubble_sort
4955
50- myList = [12 , 4 , 2 , 14 , 3 , 7 , 5 ]
56+ my_list = [12 , 4 , 2 , 14 , 3 , 7 , 5 ]
5157
52- # to sort the list
53- sorted_list = bubble_sort.sort(myList )
58+ # to sort the _list
59+ sorted__list = bubble_sort.sort(my_list )
5460
5561 * Get time complexities of all the sorting algorithms
5662
@@ -76,9 +82,9 @@ Bubble Sort
7682
7783* Functions and their uses
7884
79- .. function :: bubble_sort.sort(List )
85+ .. function :: bubble_sort.sort(_list )
8086
81- - **List ** : `list ` or `array ` to be sorted
87+ - **_list ** : `list ` or `array ` to be sorted
8288- **Return Value ** : returns the sorted `list `
8389
8490.. function :: bubble_sort.time_complexities()
@@ -91,19 +97,19 @@ Bubble Sort
9197
9298* For improved Bubble sort
9399
94- .. function :: bubble_sort.improved_sort(List )
100+ .. function :: bubble_sort.improved_sort(_list )
95101
96- - **List ** : `list ` or `array ` to be sorted
102+ - **_list ** : `list ` or `array ` to be sorted
97103- **Return Value ** : returns the sorted `list `
98104
99105Bucket Sort
100106-----------
101107
102108* Functions and their uses
103109
104- .. function :: bucket_sort.sort(List , bucketSize)
110+ .. function :: bucket_sort.sort(_list , bucketSize)
105111
106- - **List ** : `list ` or `array ` to be sorted
112+ - **_list ** : `list ` or `array ` to be sorted
107113- **bucketSize ** : size of the bucket. Default is **5 **
108114- **Return Value ** : returns the sorted `list `
109115
@@ -120,9 +126,9 @@ Counting Sort
120126
121127* Functions and their uses
122128
123- .. function :: counting_sort.sort(List )
129+ .. function :: counting_sort.sort(_list )
124130
125- - **List ** : `list ` or `array ` to be sorted
131+ - **_list ** : `list ` or `array ` to be sorted
126132- **Return Value ** : returns the sorted `list `
127133
128134.. function :: counting_sort.time_complexities()
@@ -138,9 +144,9 @@ Heap Sort
138144
139145* Functions and their uses
140146
141- .. function :: heap_sort.sort(List )
147+ .. function :: heap_sort.sort(_list )
142148
143- - **List ** : `list ` or `array ` to be sorted
149+ - **_list ** : `list ` or `array ` to be sorted
144150- **Return Value ** : returns the sorted `list `
145151
146152.. function :: heap_sort.time_complexities()
@@ -156,9 +162,9 @@ Insertion Sort
156162
157163* Functions and their uses
158164
159- .. function :: insertion_sort.sort(List )
165+ .. function :: insertion_sort.sort(_list )
160166
161- - **List ** : `list ` or `array ` to be sorted
167+ - **_list ** : `list ` or `array ` to be sorted
162168- **Return Value ** : returns the sorted `list `
163169
164170.. function :: insertion_sort.time_complexities()
@@ -174,9 +180,9 @@ Merge Sort
174180
175181* Functions and their uses
176182
177- .. function :: merge_sort.sort(List )
183+ .. function :: merge_sort.sort(_list )
178184
179- - **List ** : `list ` or `array ` to be sorted
185+ - **_list ** : `list ` or `array ` to be sorted
180186- **Return Value ** : returns the sorted `list `
181187
182188.. function :: merge_sort.time_complexities()
@@ -192,9 +198,9 @@ Quick Sort
192198
193199* Functions and their uses
194200
195- .. function :: quick_sort.sort(List )
201+ .. function :: quick_sort.sort(_list )
196202
197- - **List ** : `list ` or `array ` to be sorted
203+ - **_list ** : `list ` or `array ` to be sorted
198204- **Return Value ** : returns the sorted `list `
199205
200206.. function :: quick_sort.time_complexities()
@@ -210,9 +216,9 @@ Selection Sort
210216
211217* Functions and their uses
212218
213- .. function :: selection_sort.sort(List )
219+ .. function :: selection_sort.sort(_list )
214220
215- - **List ** : `list ` or `array ` to be sorted
221+ - **_list ** : `list ` or `array ` to be sorted
216222- **Return Value ** : returns the sorted `list `
217223
218224.. function :: selection_sort.time_complexities()
@@ -228,9 +234,9 @@ Shell Sort
228234
229235* Functions and their uses
230236
231- .. function :: shell_sort.sort(List )
237+ .. function :: shell_sort.sort(_list )
232238
233- - **List ** : `list ` or `array ` to be sorted
239+ - **_list ** : `list ` or `array ` to be sorted
234240- **Return Value ** : returns the sorted `list `
235241
236242.. function :: shell_sort.time_complexities()
0 commit comments