[leetcode-8] String to Integer (atoi)
ยท
๐Ÿข One step
LeetCode-8 String to Integer (atoi) : Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer (similar to C/C++'s atoi function). note : integers less than -231 should be clamped to -231, and integers greater than 231 - 1 should be clamped to 231 - 1.Answer :::python class Solution: def myAtoi(self, s: str) -> int: left = 0 k = '' p = '' for l ..
๋‹คํ–ˆ๋‹ค
'8' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก