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