《剑指Offer》67. 把字符串转换成整数

题目连接 牛客网java 题目描述 将一个字符串转换成一个整数,字符串不是一个合法的数值则返回 0,要求不能使用字符串转换整数的库函数。git Iuput: +2147483647 1a33 Output: 2147483647 0 解题思路 public class Solution { public int StrToInt(String str) { if (str
相关文章
相关标签/搜索