摘要: 题目:Divide two integers without using multiplication, division and mod operator.思路:注意越界问题。比如: -2147... 阅读全文
posted @ 2015-10-02 12:46 JSRGFJZ6 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 题目:Given two numbers represented as strings, return multiplication of the numbers as a string.思路:重... 阅读全文
posted @ 2015-10-02 09:34 JSRGFJZ6 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 题目:Implement pow(x, n).思路:递归首先把极限情况考虑,直接返回,接下来就是负指数的处理。最后考虑下指数是奇数还是偶数,递归调用。(注意,这种类型题目务必判断是否越界)代码:c... 阅读全文
posted @ 2015-10-02 07:35 JSRGFJZ6 阅读(172) 评论(0) 推荐(0) 编辑