CST370 Engagement Week 7
CST370 Engagement Week 7
This week, the topics studied were dynamic programming and greedy algorithms. It interested me because dynamic programming allows us to re-use some parts of the solution, since it saves the solutions of subproblems, meaning we don't have to re-calculate. The coin-row and coin-collecting problems helped me understand how tables can be used to build toward an optimal solution. I also learned about Warshall's and Floyd's algorithms and how they use matrices to solve different graph problems. The greedy technique was also interesting because it makes the best choice available at each step, which we saw with Prim's algorithm for finding a minimum spanning tree. Overall, the examples this week helped me better understand when these different techniques can be useful.
Comments
Post a Comment