Skip to content

Commit 70f63a5

Browse files
Updated README
1 parent af0479b commit 70f63a5

File tree

3 files changed

+31
-5
lines changed

3 files changed

+31
-5
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
# Algorithms and Data Structures from Scratch In Python.
1+
# Algorithms and Data Structures from Scratch In Python
22

3-
## Algorithms:
4-
1. [Searching Algorithms](/Searching%20Algorithm/)
3+
## Algorithms
4+
5+
1. Searching Algorithms.
6+
1. [Binary Search - both Recursive and Iterative Approach.](Searching%20Algorithm/binarysearch.py)
7+
2. Sorting Algorithms.
8+
1. [Sorting Algorithms Code.](Sorting%20Algorithms/sortingAlgo.py)
9+
2. [Random Numbers for Input.](Sorting%20Algorithms/num.txt)
10+
11+
## Data Structures
12+
13+
1. [Linked List.](/Linked%20List/linkedlist.py)
14+
2. [Circular Linked List.](Linked%20List/circularLL.py)

Sorting Algorithms/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Sorting Algorithms
2+
3+
The code contains 8 different sorting algorithms. The Names and the line number at which you can find the function is listed below.
4+
5+
The code also contains a utility function for finding time required to sort the array by each algorithm.
6+
7+
| Algorithm Name | Line Number |
8+
|----------------|:-------------:|
9+
| Selection Sort | [Line 4](https://github.com/shreyasvedpathak/Data-Structure-Python/blob/af0479bce737f33c715495bb8a3acb371f7b2ffc/Sorting%20Algorithms/sortingAlgo.py#L4) |
10+
| Insertion Sort | [Line 23](https://github.com/shreyasvedpathak/Data-Structure-Python/blob/af0479bce737f33c715495bb8a3acb371f7b2ffc/Sorting%20Algorithms/sortingAlgo.py#L23) |
11+
| Bubble Sort | [Line 44](https://github.com/shreyasvedpathak/Data-Structure-Python/blob/af0479bce737f33c715495bb8a3acb371f7b2ffc/Sorting%20Algorithms/sortingAlgo.py#L44) |
12+
| Shell Sort | [Line 61](https://github.com/shreyasvedpathak/Data-Structure-Python/blob/af0479bce737f33c715495bb8a3acb371f7b2ffc/Sorting%20Algorithms/sortingAlgo.py#L61) |
13+
| Merge Sort | [Line 86](https://github.com/shreyasvedpathak/Data-Structure-Python/blob/af0479bce737f33c715495bb8a3acb371f7b2ffc/Sorting%20Algorithms/sortingAlgo.py#L86) |
14+
| Quick Sort | [Line 141](https://github.com/shreyasvedpathak/Data-Structure-Python/blob/af0479bce737f33c715495bb8a3acb371f7b2ffc/Sorting%20Algorithms/sortingAlgo.py#L141) |
15+
| Count Sort | [Line 177](https://github.com/shreyasvedpathak/Data-Structure-Python/blob/af0479bce737f33c715495bb8a3acb371f7b2ffc/Sorting%20Algorithms/sortingAlgo.py#L177) |
16+
| Radix Sort | [Line 195](https://github.com/shreyasvedpathak/Data-Structure-Python/blob/af0479bce737f33c715495bb8a3acb371f7b2ffc/Sorting%20Algorithms/sortingAlgo.py#L195) |

Sorting Algorithms/sortingAlgo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def options():
255255
'''
256256
options_list = ['Selection Sort', 'Insertion Sort', 'Bubble Sort',
257257
'Shell Sort', 'Merge Sort', 'Quick Sort', 'Count Sort', 'Radix Sort',
258-
'Exit']
258+
'Time Required', 'Exit']
259259
print("MENU")
260260
for i, option in enumerate(options_list):
261261
print(f'{i + 1}. {option}')
@@ -282,7 +282,7 @@ def switch_case(choice):
282282
options()
283283

284284
choice = int(input("Enter your choice: "))
285-
if choice != 0:
285+
if choice != 10:
286286
switch_case(choice)
287287
else:
288288
break

0 commit comments

Comments
 (0)