- 博客(2)
- 收藏
- 关注
原创 (LeetCode) String to Integer (atoi) (Java)思路讲解及实现
题目:Implement atoi to convert a string to an integer. (将字符串数字转换为整数数字)atoi 即alphanumeric to integer。解题思路:1. 首先字符 '0' 对应的整数为48,'9'对应的整数为57.本题应考虑一下几个步骤:2. 输入的字符串不为空;3. 去除空格,用trim()方法;4. 判断数字
2015-10-02 23:03:26
587
原创 (LeetCode) Divide Two Integers (Java)思路讲解及实现
本文将详细介绍Divide Two Integers 的解题思路及Java实现。题目如下:Divide two integers without using multiplication, division and mod operator. (在不使用乘法,除法和取余操作的情况下实现整数的除法运算)If it is overflow, return MAX_INT.(整型
2015-09-30 15:52:53
2830
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人