Skip to content

Commit 347f42a

Browse files
committed
2
1 parent c923d24 commit 347f42a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Triangle/Triangle.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ class Solution {
33
int minimumTotal(vector<vector<int> > &triangle) {
44
// Start typing your C/C++ solution below
55
// DO NOT write int main() function
6+
67
if (triangle.empty()) return 0;
78

89
vector<int> dp[2];
10+
911
dp[0].resize(triangle.size());
1012
dp[1].resize(triangle.size());
1113
dp[0][0] = triangle[0][0];
@@ -26,4 +28,4 @@ class Solution {
2628
}
2729
return result;
2830
}
29-
};
31+
};

0 commit comments

Comments
 (0)