Skip to content

Commit fbfc351

Browse files
authored
Update minimum-number-of-coins-for-fruits.cpp
1 parent 1f27d2b commit fbfc351

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/minimum-number-of-coins-for-fruits.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Solution {
1515
dq.emplace_back(i);
1616
for (; j + (j + 1) < i; ++j) {
1717
assert(!empty(dq));
18-
if (dq.front() <= j) {
18+
if (dq.front() == j) {
1919
dq.pop_front();
2020
}
2121
}

0 commit comments

Comments
 (0)