Skip to content

Commit 28219ce

Browse files
authored
Update minimum-time-to-remove-all-cars-containing-illegal-goods.cpp
1 parent 6ffc7fb commit 28219ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/minimum-time-to-remove-all-cars-containing-illegal-goods.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Solution {
66
public:
77
int minimumTime(string s) {
88
int left = 0;
9-
int result = left + size(s);
9+
int result = left + (size(s) - 0);
1010
for (int i = 1; i <= size(s); ++i) {
1111
left = min(left + 2 * (s[i - 1] == '1'), i);
1212
result = min(result, left + static_cast<int>(size(s)) - i);

0 commit comments

Comments
 (0)