Convert s to a 32-bit signed integer:
s
+
-
[-2^31, 2^31 - 1]
0
s = "42"
42
s = " -42"
-42
0 <= s.length <= 200 `s` may contain letters, digits, spaces, `+`, `-` and `.`.
Topics
Implement myAtoi in the editor and return the answer — printing it is never graded.
myAtoi
Problem 99 of 1146 in the arena