摘要: 题目: Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. 题意: 不用乘号、除号、取模运算来模拟除法。 分析: 一开始每回减去一次除数,这样会超时,优化是减去除数*2^n,用左移运算可以实现每次翻2倍. c... 阅读全文
posted @ 2015-03-13 07:37 薇清浅 阅读(162) 评论(0) 推荐(0) 编辑