摘要:
Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.两数相除,不能用*,/,% 那么只能用位移运算了,注意边界条件防止溢出,代码如下... 阅读全文
posted @ 2015-11-05 21:13
eversliver
阅读(269)
评论(0)
推荐(0)
摘要:
Implementint sqrt(int x).Compute and return the square root ofx.简单的二分法,注意mid应该选为long,否则容易溢出: 1 class Solution { 2 public: 3 int mySqrt(int x) { 4 ... 阅读全文
posted @ 2015-11-05 20:16
eversliver
阅读(291)
评论(0)
推荐(0)
摘要:
Related to questionExcel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A ... 阅读全文
posted @ 2015-11-05 19:42
eversliver
阅读(288)
评论(0)
推荐(0)

浙公网安备 33010602011771号