Wednesday, 2 April 2014
Sorting and Efficiency
From the readings and the lectures I have learned about new sorting methods such as the quick sort. Previously, I've already learned about the other sorting methods in csc108 and in high school. This semester was my first time learning about how to calculate the run-time and efficiency of a sort. In class, it was shown that the runtime of an algorithm can be expressed as a logarithm when the work done by an algorithm is divided into smaller parts such as in a merge sort or a binary search. I found it interesting to figure out that two programs may have that same worst-case run times but different best-case run times such as the insertion sort compared to the selection sort. Also, analysing the efficiencies of sorting algorithms showed that algorithms using recursion may be more useful such as merge sort and the quick sort. As of now I have a pretty good understanding of all the sorting algorithms but the count sort that was shown in class as an example somewhat confuses me. I do have an understanding though of the big-Oh notation that was taught in class because I was simultaneously learning about it in the course csc165. To me big-Oh notation is a way to express the behaviour of the runtime of an algorithm as the input grows substantially larger.
Subscribe to:
Posts (Atom)