2014年3月30日星期日

Week #11: Sorting and efficiency

Over the last serveral weeks, we learned about the sorting and efficiency from the lecture, reading resource, and lab practicing. Sorting is a method which can collect the elements in a specific order in computer science. However, there are many different kinds of sorting method in python, such as bubble sort, selection sort, etc. Based on my comprehension, we are not going to learn about how to write the sorting function instead of learning that which sorting method is more efficiency and why this method is more efficiency than other. This is the purpose of what we learned about in this week.

When I studied the sorting and efficiency, I would like to realize the process of executing firstly in the bubble sort, the selection sort, the insertion sort, the merge sort and the quick sort. In this week's lab exercise, we did a experiment about the sorting efficiency and abserved the change of result in different condition. When we know about the execution of different sorting method, we will understand the experimental result more easily. 

In the lab, after we collected the data of sorting time, we made some graph in excel for observing the change of the result and discuss with my partner. We found that, the data just changed slightly and the selection sort is the most efficiency in this condition.

After finishing the lab and lecture, I found that the most important reason of sorting efficiency is that if the sorting function is more complex, it will spend more time. Also, the input will affect the running time. We can do the exercise of big-oh for improve the knowledge of sorting efficiency.

没有评论:

发表评论