Best Time to Buy and Sell Stock IIQuestion SolutionSay you have an array for which the ith element is the price of a given stock on day i.Design an al...
分类:
其他好文 时间:
2015-01-03 19:45:09
阅读次数:
140
Best Time to Buy and Sell Stock IIIQuestion SolutionSay you have an array for which the ith element is the price of a given stock on day i.Design an a...
分类:
其他好文 时间:
2015-01-03 19:43:30
阅读次数:
171
Design a system to take user-provided URLs and transform them to a shortened URLs that redirect back to original.Questions:1. How many URLs shall we k...
分类:
Web程序 时间:
2015-01-03 15:52:05
阅读次数:
15540
Head First Design Pattern 读书笔记(2) Observer Pattern 观察者模式 ========= ##Observer Pattern 类图 ![观察者模式类图][1] ##定义 观察者模式:在对象间定义一个一对多的关系,当其中一个的对象发生改变时...
分类:
其他好文 时间:
2015-01-02 22:31:15
阅读次数:
302
Head First Design Pattern 读书笔记(1) Strategy Pattern 策略模式 ========= 这几天为了锻炼看英语文档的能力,开着有道硬着头皮看 《Head First Desgin Pattern》的原版书,顺便做下笔记,把里面提到的每个模...
分类:
其他好文 时间:
2015-01-02 21:10:14
阅读次数:
300
参见:http://soj.sysu.edu.cn/show_problem.php?pid=1004&cid=569 果然人脑是有问题的,测试样列还是随机生成的好Design an efficient fine_median algorithmof logrithmicrunning tim...
分类:
编程语言 时间:
2015-01-02 21:08:37
阅读次数:
305
来源参考:http://www.chromium.org/developers/design-documents/compositor-thread-architecture
Render线程的stalls:
1,style recalc
2,sync network request
3,long painting times(复杂的页面内容?)
4,GC
Compos...
分类:
编程语言 时间:
2014-12-31 20:14:17
阅读次数:
931
1.定义
生成器是一种对象创建型的模式。生成器将一个复杂对象的构建和它的表示分离,使得同样的构建过程可以创建不同的表示。
2.适用性
当创建复杂对象的算法应该独立于该对象的组成部分以及他们的装配方式时当构造过程必须允许被构造的对象又不同的表示时
3.结构
Builder: 为创建一个Product对象的各个部件指定抽象接口。(工厂方法是为整个对象)
ConcreteBuil...
分类:
其他好文 时间:
2014-12-31 16:14:29
阅读次数:
171
说起CSS3的新特性,就不得不提到 Media Queries 。最近 Max Design 更新的一个泛读列表里,赫然就有关于 Media Queries 的文章。同时位列其中的也有前天我刚刚翻译的IE9, Opacity 和 Alpha。虽然标题相同,但本文并不是列表上CSS3 Media Qu...
分类:
Web程序 时间:
2014-12-31 15:50:31
阅读次数:
202