This week we delved deeper into recursive functions by looking at quick sort, a recursive sorting method that is supposedly more efficient than other sorting methods such as insertion sort and selection sort. The visual demonstration led by the instructor was quite useful, because I lose track of the code every time I try to trace it with some examples. Because of this, I am still unable to analyze the run time of quick sort compared to other sorting methods, so I am not totally convinced of its efficiency. Moreover, I think it is interesting that quick sort will sort a sequence again even if it is already in order. Would it be more beneficial if there were steps that check if the sequence was already in order?
We also revisited an abstract data type stack, in which its elements are last in first out. I think it is a great method to check if there are matching pairs of something, among its many other uses. There was not a lot of content this week due to the term test.
No comments:
Post a Comment