File tree 1 file changed +19
-8
lines changed
algorithms/cpp/minimumPathSum
1 file changed +19
-8
lines changed Original file line number Diff line number Diff line change 2
2
// Author : Hao Chen
3
3
// Date : 2014-06-21
4
4
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
+ ******************************************************************************************************/
13
24
14
25
#include < limits.h>
15
26
#include < iostream>
You can’t perform that action at this time.
0 commit comments