小凉

3 0642700 3 0642770 5 34202 13942 4314 0624

2016年5月12日

HeadFirst 设计模式

摘要: 一、设计原则 封装变化 多用组合,少用继承 针对接口编程,不针对实现编程 为交互对象之间的松紧耦合设计而努力 对扩展开放,都修稿关闭 依赖抽象,不要依赖具体类 最少知识原则:之和朋友交谈 好莱坞原则:别找我,我会找你(由超类主控一切,当他们需要的时候,自然回去调用子类) 类应该只有一个改变的理由 二 阅读全文

posted @ 2016-05-12 20:42 小凉 阅读(382) 评论(0) 推荐(0) 编辑

Number of 1 Bits(Difficulty: Easy)

摘要: 题目: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32- 阅读全文

posted @ 2016-05-12 18:20 小凉 阅读(147) 评论(0) 推荐(0) 编辑

导航