Skip to content

Commit 934e6c5

Browse files
update 39 cpp solution
1 parent f49208d commit 934e6c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/0039-Combination-Sum/0039.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Solution
2424
res.push_back(path);
2525
return;
2626
}
27-
if (!path.empty() and target < *(path.end() - 1)) return;
27+
if (!path.empty() and target < *(path.rbegin())) return;
2828
for (unsigned int i = index; i < candidates.size(); ++i)
2929
{
3030
path.push_back(candidates[i]);

0 commit comments

Comments
 (0)