Thursday, 27 March 2014

CSC148 Week of Mar 23

Sorting and Efficiency
This week, we covered multiple types of sorting, why they are used and how efficient they are compared to the list size
Bubble sort, selection sort, insertion sort, quick sort, merge sort, python's built-in sort and the conditional count sort. Generally, since python's built-in sort is a combination of the other sorts in order to maximize efficiency, it will run the fastest out of all of them. However at very large lists, the simple count sort can run slightly faster than the built-in sort.
The efficiency of the count sort though comes from the assumption that all the values in the list are between 0 and len(list).

No comments:

Post a Comment