Skip to content

Latest commit

 

History

History

0008.string-to-integer-atoi

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

题目

Implement atoi to convert a string to an integer.

Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases.

解题思路

转换并不难,难得的是,处理各种奇葩的输入。详见程序注释。

总结

良好的单元测试真的很重要。