2015年1月2日

摘要: Sqrt(x)Implementint sqrt(int x).Compute and return the square root ofx.SOLUTION 1:参见:二分法总结,以及模板:http://t.cn/RZGkPQc 1 public class Solution { 2 pu... 阅读全文
posted @ 2015-01-02 22:59 Yu's Garden 阅读(2186) 评论(0) 推荐(0) 编辑
摘要: 排序总结面试经验硅谷某前沿小Startup面试时,问到的一个题目就是写一个快速排序算法。进而面试官问到了各种算法的算法复杂度,进而又问了Merge Sort 与 QuickSort 的优劣。对排序算法的全面理解,体现了计算机学生的功底。现在来讲Merge Sort 与Quick Sort 是最流行的... 阅读全文
posted @ 2015-01-02 22:39 Yu's Garden 阅读(5568) 评论(0) 推荐(0) 编辑
摘要: 二分法模板: 1 while (l A[l]) {11 l = m;12 } else {13 r = m;14 }15 } 相关二分法题目链接:L... 阅读全文
posted @ 2015-01-02 22:07 Yu's Garden 阅读(3723) 评论(0) 推荐(0) 编辑

导航