Leetcode -- Sqrt(x)
摘要:
题目:Implementint sqrt(int x).Compute and return the square root ofx思路:1、利用二分法查找 2、Discuss里面贴了一些利用移位做的方法;BTW: C++11定义的Sqrt函数 from double sqrt (doubl... 阅读全文
posted @ 2014-11-13 01:13 沉甸甸的蛋疼 阅读(176) 评论(0) 推荐(0) 编辑