Tuesday, March 29, 2016

Week #10

In week 10 we started talking about recursion efficiency, which is what I've always been waiting for since the beginning of the semester. I would really like to know what techniques or strategies we can use to decrease the run-time of our programs. The professor use the famous example of Fibonacci numbers to show us how we can massively reduce the run-time by memorized data that we have seen. However, when we increase the input to some really large number, the recursion still dies and seems to take forever to calculate. I was a little bit disappointed to some extend because the professor didn't talk about what are other techniques that we can use to further improve the program; however, it might just be the case that there isn't anything we can do about it and for a simple program like the Fibonacci number, we cannot improve it any further.
Another topic that I found interesting this week is the quick sort algorithm. I've only seen how it works on some diagram but never understand how it truly works. In addition, I now understand why computer scientists say quick sort is best with random order list because if we have a sorted list, then using quick sort is simply not very efficient since all the elements will be group to one side.

No comments:

Post a Comment