Skip to content

Commit c02ef34

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

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

C++/expression-add-operators.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Solution {
2727
for (int i = pos; i < s.length(); ++i) {
2828
num_str.push_back(s[i]);
2929
// Check if the value exceeds the max of INT.
30-
if (num_str.size() == to_string(numeric_limits<int>::max()).size() &&
30+
if (num_str.length() == to_string(numeric_limits<int>::max()).length() &&
3131
num_str > to_string(numeric_limits<int>::max())) {
3232
break;
3333
}

0 commit comments

Comments
 (0)