Discover Packages
github.com/chai2010/LeetCode-in-Go
Algorithms
0008.string-to-integer-atoi
package
Version:
v0.0.0-...-4e682c9
Opens a new window with list of versions in this module.
Published: Jan 8, 2018
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
题目
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.
解题思路
转换并不难,难得的是,处理各种奇葩的输入。详见程序注释。
总结
良好的单元测试真的很重要。
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.