File tree Expand file tree Collapse file tree 1 file changed +19
-8
lines changed
algorithms/cpp/minimumPathSum Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Original file line number Diff line number Diff line change 22// Author : Hao Chen
33// Date : 2014-06-21
44
5- /* *********************************************************************************
6- *
7- * Given a m x n grid filled with non-negative numbers, find a path from top left to
8- * bottom right which minimizes the sum of all numbers along its path.
9- *
10- * Note: You can only move either down or right at any point in time.
11- *
12- **********************************************************************************/
5+ /* ****************************************************************************************************
6+ *
7+ * Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right
8+ * which minimizes the sum of all numbers along its path.
9+ *
10+ * Note: You can only move either down or right at any point in time.
11+ *
12+ * Example:
13+ *
14+ * Input:
15+ * [
16+ * [1,3,1],
17+ * [1,5,1],
18+ * [4,2,1]
19+ * ]
20+ * Output: 7
21+ * Explanation: Because the path 1→3→1→1→1 minimizes the sum.
22+ *
23+ ******************************************************************************************************/
1324
1425#include < limits.h>
1526#include < iostream>
You can’t perform that action at this time.
0 commit comments