摘要: UUID 一个可以生成唯一标识符的工具类 hashMap 中的size 应该为2的次幂这样可以保证每个位置都是可用的类似取余 a%b=a&(b-1)(b=2^n) 阅读全文
posted @ 2018-09-03 14:20 dishfo 阅读(87) 评论(0) 推荐(0)
摘要: void shellSort(int * a,int n){ int gap=n/2; while(gap>0){ inGap(gap,a,n); gap/=2; }}void inGap(int gap,int *a,int n){ for(int i=gap;i<n;i++){//减少了for循 阅读全文
posted @ 2018-09-03 10:34 dishfo 阅读(172) 评论(0) 推荐(0)