WHAT?主要思想:子程序不应因传入参数错误而被破坏WHY?保护程序免遭非法输入的破坏HOW?断言assert denominator != 0 : "denominator should not be 0"; // 启动VM时需要 -ea 参数用以启动assert功能只用于开发、维护阶段用错误处理...
分类:
其他好文 时间:
2014-06-28 20:11:37
阅读次数:
274
Given an array of integers, every element appears three times except for one. Find that single one.Note:Your algorithm should have a linear runtime co...
分类:
其他好文 时间:
2014-06-28 13:44:09
阅读次数:
188
接口分离原则(The Interface Segregation Principle)表述为“客户类不应被强迫依赖那些它们不需要的接口。(Clients should not be forced to depend upon interfaces that they do not use.)”。本篇...
分类:
其他好文 时间:
2014-06-28 13:39:35
阅读次数:
312
According to the order of data structure book, Arrays should be introduced in the frist time. When reviewing the some information related to arrays, I feel shocked that many useful classes and methods...
分类:
编程语言 时间:
2014-06-22 18:13:18
阅读次数:
316
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:
其他好文 时间:
2014-06-21 09:18:50
阅读次数:
263
len is a build-in function that returns the numbers of characters in a string: Since we started counting at zero, the last index should be 5...
分类:
其他好文 时间:
2014-06-21 08:17:22
阅读次数:
243
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists./** * Def...
分类:
其他好文 时间:
2014-06-21 07:55:42
阅读次数:
197
Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexi...
分类:
其他好文 时间:
2014-06-20 23:34:47
阅读次数:
308
依赖倒置原则(The Dependency Inversion Principle)可表述为 “高层模块不应该依赖于低层模块,二者都应该依赖于抽象。抽象不应该依赖于具体实现细节,而具体实现细节应该依赖于抽象。(A. High level modules should not depend upon ...
分类:
其他好文 时间:
2014-06-20 20:58:39
阅读次数:
354
global.h 1 /* GLOBAL.H - RSAREF types and constants 2 */ 3 4 /* PROTOTYPES should be set to one if and only if the compiler supports 5 function argu.....
分类:
其他好文 时间:
2014-06-20 18:16:49
阅读次数:
312