随笔分类 - LeetCode
摘要:一、题目 实现atoi,将字符串转化乘int类型的数 int myAtoi(string str)函数,返回值为转化后的数,参数为需要转化的str 题目链接:https://leetcode.com/problems/string-to-integer-atoi/description/ 二、实现
阅读全文
摘要:一、题目 给定一个32位有符号整数,反转该数的数字 题目链接:https://leetcode.com/problems/reverse-integer/description/ 例子: 注意:超出范围时返回0 二、解答 思路:x%10可以得到最低位,x/10可以把最低位去除掉,然后以当前num乘1
阅读全文

浙公网安备 33010602011771号