dynamicProgramming Using dynamic programming to take the path with the most value starting from the first row to the last row.