Summer.K
2 min readNov 21, 2020

Leetcode Algorithm Problem 8. String to Integer (atoi)

Implement atoi which converts a string to an integer.The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from this character takes an optional initial plus or minus sign followed by as many numerical digits as possible, and interprets them as a numerical value.The string can contain additional characters after those that form the integral number, which are ignored and have no effect on the behavior of this function.If the first…
Summer.K
0 Followers

Graduate student looking for data full-time job.