@@ -19,8 +19,8 @@ class Solution {
19
19
for (int i = start; i < end; ++i) {
20
20
const auto cur = input[i];
21
21
if (cur == ' +' || cur == ' -' || cur == ' *' ) {
22
- vector< int > left = move ( diffWaysToComputeRecu (input, start, i, lookup) );
23
- vector< int > right = move ( diffWaysToComputeRecu (input, i + 1 , end, lookup) );
22
+ auto left = diffWaysToComputeRecu (input, start, i, lookup);
23
+ auto right = diffWaysToComputeRecu (input, i + 1 , end, lookup);
24
24
for (const auto & num1 : left) {
25
25
for (const auto & num2 : right) {
26
26
if (cur == ' +' ) {
@@ -38,7 +38,7 @@ class Solution {
38
38
if (result.empty ()) {
39
39
result.emplace_back (stoi (input.substr (start, end - start)));
40
40
}
41
- lookup[start][end] = move ( result) ;
41
+ lookup[start][end] = result;
42
42
return lookup[start][end];
43
43
}
44
44
};
@@ -52,8 +52,8 @@ class Solution2 {
52
52
for (int i = 0 ; i < input.size (); ++i) {
53
53
const auto cur = input[i];
54
54
if (cur == ' +' || cur == ' -' || cur == ' *' ) {
55
- vector< int > left = move ( diffWaysToCompute (input.substr (0 , i) ));
56
- vector< int > right = move ( diffWaysToCompute (input.substr (i + 1 ) ));
55
+ auto left = diffWaysToCompute (input.substr (0 , i));
56
+ auto right = diffWaysToCompute (input.substr (i + 1 ));
57
57
for (const auto & num1 : left) {
58
58
for (const auto & num2 : right) {
59
59
if (cur == ' +' ) {
0 commit comments