
题目
BaldWinf
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
统计1的个数
求下面函数的返回值(微软) – 统计1的个数int func(int x) { int countx = 0; while(x) { countx++; x = x&(x-1); } return countx; } 假定x = 9999 10011100001111 答案: 8思路: 将x转化为2进制,看原创 2017-02-16 13:50:46 · 382 阅读 · 0 评论 -
什么是SOLID
S.O.L.I.D是面向对象设计和编程(OOD&OOP)中几个重要编码原则(Programming Priciple)的首字母缩写。SRP The Single Responsibility Principle 单一责任原则 OCP The Open Closed Principle 开放封闭原则 LSP The Liskov Substitution Principle 里氏替换原则原创 2017-01-20 16:46:29 · 5197 阅读 · 0 评论