Skip to content

Commit b997f3d

Browse files
authored
Update Solution.cpp
1 parent 10d997c commit b997f3d

File tree

1 file changed

+2
-2
lines changed
  • solution/0000-0099/0008.String to Integer (atoi)

1 file changed

+2
-2
lines changed

solution/0000-0099/0008.String to Integer (atoi)/Solution.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
class Solution {
1+
class Solution {
22
public:
33
int myAtoi(string s) {
44
int i = 0, n = s.size();
55
while (i < n && s[i] == ' ')
66
++i;
7-
7+
88
int sign = 1;
99
if (i < n && (s[i] == '-' || s[i] == '+')) {
1010
sign = s[i] == '-' ? -1 : 1;

0 commit comments

Comments
 (0)