Skip to content

Commit 11090be

Browse files
committed
C++ For getting the last element of a vector, used back().
1 parent 56c6a85 commit 11090be

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.idea/
2-
temp/
2+
temp/
3+
problems/empty-template.md

problems/0416-partition-equal-subset-sum.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public:
184184
}
185185
}
186186

187-
return dp[dp.size() - 1];
187+
return dp.back();
188188
}
189189
};
190190
```
@@ -211,7 +211,7 @@ public:
211211
}
212212
}
213213

214-
return dp[dp.size() - 1];
214+
return dp.back();
215215
}
216216
};
217217
```

0 commit comments

Comments
 (0)