@@ -166,7 +166,7 @@ Design and implement an alternative graph representation and graph algorithm for
1. For each node in reverse DFS post-order, apply Dijkstra's edge relaxation step: if the distance to the neighboring node using the given edge is less than the `distTo` value to the neighboring node, update `distTo` and `edgeTo` accordingly.
`DynamicProgrammingSeamFinder`
: A [dynamic programming seam finding algorithm](https://avikdas.com/2019/05/14/real-world-dynamic-programming-seam-carving.html#bottom-up-implementation). This algorithm solves the problem by considering pixels from left to right similar to the `ToposortDAGSolver` except that it operates directly on the `Picture` rather than through an abstract `Graph` representation.
: A [dynamic programming seam finding algorithm](https://adityashrm21.github.io/Image-Compression/#seam-carving-using-dynamic-programming). This algorithm solves the problem by considering pixels from left to right similar to the `ToposortDAGSolver` except that it operates directly on the `Picture` rather than through an abstract `Graph` representation.
: 1. Initialize a 2-D `double[picture.width()][picture.height()]` to represent the cost of the **minimum energy path** from the left edge to each pixel.
1. Iteratively compute the minimum energy path to each pixel starting from the left edge of the picture and working towards the right edge by considering each pixel's preceding path costs: the **left-up**, **left-middle**, and **left-down** pixels.
1. Compute a shortest path by starting from the right edge and working back towards the left edge, adding each minimum-cost **y-coordinate** to a list.