cst- 370 - week 7- learning journal

This week’s module focused on dynamic programming and graph algorithms, specifically the maximum coin collection problem and the Floyd algorithm for all-pairs shortest paths. In the first lab, we implemented a dynamic programming solution on an n by m grid, carefully constructing a DP table to compute the maximum number of coins that can be collected when moving only right or down. The most important part was understanding how the recurrence relation builds optimal solutions from smaller subproblems. We also practiced reconstructing the optimal path and handling tie-breaking rules correctly. In the second lab, we implemented Floyd’s algorithm using a triple nested loop structure to update shortest path distances. This reinforced the concept of gradually improving solutions through intermediate vertices and understanding O(n^3) time complexity.

Comments

Popular posts from this blog

Week 2 Learning Journal 5 Parts

Week 4 Journal

BOOK REPORT EXTRA CREDIT