Skip to content

Commit 54f89fd

Browse files
authored
Update minimum-cost-to-separate-sentence-into-rows.cpp
1 parent 051ef26 commit 54f89fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/minimum-cost-to-separate-sentence-into-rows.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class Solution {
55
public:
66
int minimumCost(string sentence, int k) {
7-
vector<int> dp, word_lens; // dp[i]: min cost of word_lens[-1-i:]
7+
vector<int> word_lens, dp; // dp[i]: min cost of word_lens[-1-i:]
88
for (int i = size(sentence) - 1, j = size(sentence) - 1, t = -1; i >= -1; --i) {
99
if (i != -1 && sentence[i] != ' ') {
1010
continue;

0 commit comments

Comments
 (0)