Skip to content

Commit 6426213

Browse files
committed
Modified docs for sorting
1 parent abb6e8d commit 6426213

File tree

1 file changed

+171
-0
lines changed

1 file changed

+171
-0
lines changed

docs/Sorting.rst

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,174 @@ Features
6969
7070
# for printing the source code of bubble_sort
7171
print(bubble_sort.get_code())
72+
73+
74+
Bubble Sort
75+
-----------
76+
77+
* Functions and their uses
78+
79+
.. function:: bubble_sort.sort(List)
80+
81+
- **List** : `list` or `array` to be sorted
82+
- **Return Value** : returns the sorted `list`
83+
84+
.. function:: bubble_sort.time_complexities()
85+
86+
- **Return Value** : returns time complexities (Best, Average, Worst)
87+
88+
.. function:: bubble_sort.get_code()
89+
90+
- **Return Value** : returns the code for the ``bubble_sort.sort()`` function
91+
92+
* For improved Bubble sort
93+
94+
.. function:: bubble_sort.improved_sort(List)
95+
96+
- **List** : `list` or `array` to be sorted
97+
- **Return Value** : returns the sorted `list`
98+
99+
Bucket Sort
100+
-----------
101+
102+
* Functions and their uses
103+
104+
.. function:: bucket_sort.sort(List, bucketSize)
105+
106+
- **List** : `list` or `array` to be sorted
107+
- **bucketSize** : size of the bucket. Default is **5**
108+
- **Return Value** : returns the sorted `list`
109+
110+
.. function:: bucket_sort.time_complexities()
111+
112+
- **Return Value** : returns time complexities (Best, Average, Worst)
113+
114+
.. function:: bucket_sort.get_code()
115+
116+
- **Return Value** : returns the code for the ``bucket_sort.sort()`` function
117+
118+
Counting Sort
119+
-------------
120+
121+
* Functions and their uses
122+
123+
.. function:: counting_sort.sort(List)
124+
125+
- **List** : `list` or `array` to be sorted
126+
- **Return Value** : returns the sorted `list`
127+
128+
.. function:: counting_sort.time_complexities()
129+
130+
- **Return Value** : returns time complexities (Best, Average, Worst)
131+
132+
.. function:: counting_sort.get_code()
133+
134+
- **Return Value** : returns the code for the ``counting_sort.sort()`` function
135+
136+
Heap Sort
137+
---------
138+
139+
* Functions and their uses
140+
141+
.. function:: heap_sort.sort(List)
142+
143+
- **List** : `list` or `array` to be sorted
144+
- **Return Value** : returns the sorted `list`
145+
146+
.. function:: heap_sort.time_complexities()
147+
148+
- **Return Value** : returns time complexities (Best, Average, Worst)
149+
150+
.. function:: heap_sort.get_code()
151+
152+
- **Return Value** : returns the code for the ``heap_sort.sort()`` function
153+
154+
Insertion Sort
155+
--------------
156+
157+
* Functions and their uses
158+
159+
.. function:: insertion_sort.sort(List)
160+
161+
- **List** : `list` or `array` to be sorted
162+
- **Return Value** : returns the sorted `list`
163+
164+
.. function:: insertion_sort.time_complexities()
165+
166+
- **Return Value** : returns time complexities (Best, Average, Worst)
167+
168+
.. function:: insertion_sort.get_code()
169+
170+
- **Return Value** : returns the code for the ``insertion_sort.sort()`` function
171+
172+
Merge Sort
173+
----------
174+
175+
* Functions and their uses
176+
177+
.. function:: merge_sort.sort(List)
178+
179+
- **List** : `list` or `array` to be sorted
180+
- **Return Value** : returns the sorted `list`
181+
182+
.. function:: merge_sort.time_complexities()
183+
184+
- **Return Value** : returns time complexities (Best, Average, Worst)
185+
186+
.. function:: merge_sort.get_code()
187+
188+
- **Return Value** : returns the code for the ``merge_sort.sort()`` function
189+
190+
Quick Sort
191+
----------
192+
193+
* Functions and their uses
194+
195+
.. function:: quick_sort.sort(List)
196+
197+
- **List** : `list` or `array` to be sorted
198+
- **Return Value** : returns the sorted `list`
199+
200+
.. function:: quick_sort.time_complexities()
201+
202+
- **Return Value** : returns time complexities (Best, Average, Worst)
203+
204+
.. function:: quick_sort.get_code()
205+
206+
- **Return Value** : returns the code for the ``quick_sort.sort()`` function
207+
208+
Selection Sort
209+
--------------
210+
211+
* Functions and their uses
212+
213+
.. function:: selection_sort.sort(List)
214+
215+
- **List** : `list` or `array` to be sorted
216+
- **Return Value** : returns the sorted `list`
217+
218+
.. function:: selection_sort.time_complexities()
219+
220+
- **Return Value** : returns time complexities (Best, Average, Worst)
221+
222+
.. function:: selection_sort.get_code()
223+
224+
- **Return Value** : returns the code for the ``selection_sort.sort()`` function
225+
226+
Shell Sort
227+
----------
228+
229+
* Functions and their uses
230+
231+
.. function:: shell_sort.sort(List)
232+
233+
- **List** : `list` or `array` to be sorted
234+
- **Return Value** : returns the sorted `list`
235+
236+
.. function:: shell_sort.time_complexities()
237+
238+
- **Return Value** : returns time complexities (Best, Average, Worst)
239+
240+
.. function:: shell_sort.get_code()
241+
242+
- **Return Value** : returns the code for the ``shell_sort.sort()`` function

0 commit comments

Comments
 (0)