Week 11: Sorting
Week 11 Goals
-
Creating list of objects from data read in from a file, and performing some operations on them (including a search)
-
Sorting Algorithms
-
Timing Parts of a program’s execution
-
Complexity Analysis of sorting algorithms
Week 11 Code
-
obj_list: list of objects-
create a list of
BestDogobjects from data read in from thebestInShow.txtfile -
perform some operations on the list
-
-
timeSearch.py: time linear search
-
timeBinarySearch.py: time binary search
-
timeSort.py: write, and time, a sorting algorithm
Compexity Graph
This graph shows different functions of the number of steps in terms of the problem size (N).