Skip to content

Commit 127e7be

Browse files
Update README.md
1 parent 6fdcf59 commit 127e7be

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

README.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
1-
2-
31
# Linked Lists
42
## Description
5-
Code that defines a custom list class (linked lists) and implements and time sorting algorithms on it
3+
Code that defines a custom list class (linked lists) and implements four sorting algorithms; then records their runtimes when sorting lists with increasing number of elements.
64
## Data Structure
75
List of nodes
86
https://github.com/BlaiseBaptist/python-lists-in-python/blob/56f69acb4e32dd789924055915159e869c0ba158/main.py#L7-L9
97
### Nodes
10-
Nodes have a number in them and point to another node
8+
Nodes have a item in them and point to another node
119
https://github.com/BlaiseBaptist/python-lists-in-python/blob/56f69acb4e32dd789924055915159e869c0ba158/main.py#L15-L18
12-
1310
## Sorting Algorithms
14-
1511
||Bubble|Selection|Merge|Quick
1612
|:--|:--|:--|:--|:--
1713
|Time Complexity|O(n<sup>2</sup>)|O(n<sup>2</sup>)|O(n log n)|O(n log n)
18-
19-
2014
### Bubble
21-
Compares pairs of elements and swaps them if they are out of order
15+
Compares pairs of elements and swaps them if they are out of order.
2216
### Selection
23-
Takes the smallest element of the main list and adds it to a sub-list until
17+
Takes the smallest element of the main list and adds it to a sub-list until it get to the end of the list.
2418
### Merge
25-
Splits the list into elements then merges pairs of sub-lists keeping the elements in order until is one list again
19+
Splits the list into elements, then merges pairs of sub-lists keeping, the elements in order until it is one list again.
2620
### Quick
27-
Selects a pivot and moves all smaller elements to one side it then does the same to each side of the list
28-
21+
Selects a pivot and moves all smaller elements to one side of the list then does the same to each side of the list.

0 commit comments

Comments
 (0)