Skip to content

Commit 276f7c4

Browse files
committed
Updated Sorting.rst
1 parent f6a1f08 commit 276f7c4

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

docs/Sorting.rst

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
============================
1+
=======
22
Sorting
3-
============================
3+
=======
44

55
Just sort the way you want.
66

77
-----------------
88
Quick Start Guide
99
-----------------
1010

11-
::
11+
.. code-block:: python
1212
1313
from pygorithm.sorting import bubble_sort
1414
@@ -20,6 +20,31 @@ Quick Start Guide
2020
# to sort the list
2121
sorted_list = bubble_sort.sort(myList)
2222
23-
---------------
23+
--------
2424
Features
25-
---------------
25+
--------
26+
27+
* Sorts available:
28+
- Bubble Sort (bubble_sort)
29+
- Selection Sort (selection_sort)
30+
- Insertion Sort (insertion_sort)
31+
- Merge Sort (merge_sort)
32+
- Quick Sort (quick_sort)
33+
34+
* Get time complexities of all the sorting algorithms
35+
36+
.. code-block:: python
37+
38+
from pygorithm.sorting import bubble_sort
39+
40+
# for printing time complexities of bubble_sort
41+
print(bubble_sort.time_complexities())
42+
43+
* Get the code used for any of the algorithm
44+
45+
.. code-block:: python
46+
47+
from pygorithm.sorting import bubble_sort
48+
49+
# for printing the source code of bubble_sort
50+
print(bubble_sort.get_code())

0 commit comments

Comments
 (0)