We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5ee1f3 commit c02ef34Copy full SHA for c02ef34
1 file changed
C++/expression-add-operators.cpp
@@ -27,7 +27,7 @@ class Solution {
27
for (int i = pos; i < s.length(); ++i) {
28
num_str.push_back(s[i]);
29
// Check if the value exceeds the max of INT.
30
- if (num_str.size() == to_string(numeric_limits<int>::max()).size() &&
+ if (num_str.length() == to_string(numeric_limits<int>::max()).length() &&
31
num_str > to_string(numeric_limits<int>::max())) {
32
break;
33
}
0 commit comments