This was a fresh week that introduced new topics - algorithms. The word scares me. I always imagined them to be some high level magic that will solve every problem in existence. I see them being used in stock markets, Amazon, and even in worst ever TCC.
The introduction class definitely opened up my views on the functions I wrote in CSC108 class, adding a more analytical view to the mechanical typing. It is fascinating to see how each of functions I wrote is a algorithm its own that solves a problem.
Moreover, in this class I learned that algorithms range from all possible of complexity. In this weeks class we worked on a simple algorithm that does a linear search. Through the example, we learned analyzing the algorithm; finding the steps it take to complete a search. However, the loops throws me off as I need to consider how it react through in the worst condition. To counter the problem, I wrote out a simpler loop and traced the steps and used different outputs. I quickly understood the concept.
It is quite unique that we have to always consider the worst case. It is the one that consumes the most time. By the end of the week there was also the introduction the idea of Big Os. It is the maximum time to go through the algorithm in the worst time possible. It also bounds the maximum and minimum steps.
Not too bad a week.
没有评论:
发表评论