Skip to content

Commit 84fe01a

Browse files
committed
Update expression-add-operators.cpp
1 parent c02ef34 commit 84fe01a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

C++/expression-add-operators.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@ class Solution {
1010
return result;
1111
}
1212

13-
bool addOperatorsDFS(const string& s, const int& target, const int& pos,
13+
void addOperatorsDFS(const string& s, const int& target, const int& pos,
1414
const int& operand1, const int& operand2, vector<string> *expr,
1515
vector<string> *result) {
1616
// Base Case 1
1717
if (pos == s.length()) {
1818
if (operand1 + operand2 == target) {
1919
result->emplace_back(move(join(*expr)));
20-
return true;
2120
}
22-
return false;
21+
return;
2322
}
2423

2524
int num = 0;

0 commit comments

Comments
 (0)