In the previous post I described the first week of "Data Structures and Algorithms" course on Coursera. In this post I am going to describe the second week.
Authors started the second week with Fibonacci numbers. 15th century Italian mathematician Leonardo Fibonacci found this sequence of numbers where every number in it is the sum of the two preceding ones. They presented two versions of Fibonacci numbers algorithm: exponential (recursive) and polynomial.
They introduced a couple of very important concepts, such as types of algorithms:
And levels of algorithm's design:
Then they continued with the greatest common divisor algorithms: naive GCD and Euclidian algorithm. Also they covered Big-O notation and how algorithm's runtime depends on input. There were few quizzes (nothing special) and after that I've started working on the assignment.
There are number of problems that has to be solved. The first three problems are very simple and covered in lectures. The other four were more complex and were not covered in lectures.
There are couple of links that I have used to solve this week problems, if you don't want to get a complete solution but just looking for more info regarding outlined problems, you can check these:
In this post I have described the second week of "Data Structures and Algorithms" course on Coursera. This week wasn't hard, I hope next one will be more challenging. I like that weekly assignment starts with easier problems and then you get more complex ones. In the next post I will cover the third week.