摘要: 题意: Implement int sqrt(int x). Compute and return the square root of x.(Medium) 分析: 二分搜索套路题,不能开方开尽的时候,取结果整数位。 注意:判定条件中,用x / mid == mid而不是 mid * mid == 阅读全文
posted @ 2016-09-21 22:56 wangxiaobao1114 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit 阅读全文
posted @ 2016-09-21 22:53 wangxiaobao1114 阅读(184) 评论(0) 推荐(0) 编辑