wangjunstf / wangjunstf.github.io

我的博客。
https://wangjunstf.github.io/
0 stars 0 forks source link

字符串转整数——自动机 | 编程之禅 #14

Open wangjunstf opened 3 years ago

wangjunstf commented 3 years ago

https://www.wangjunblogs.com/2021/09/17/zi-fu-chuan-zhuan-zheng-shu-zi-dong-ji/#more

字符串转整数——自动机题目链接 请你来实现一个 myAtoi(string s) 函数,使其能将字符串转换成一个 32 位有符号整数(类似 C/C++ 中的 atoi 函数)。 函数 myAtoi(string s) 的算法如下: