- 博客(5)
- 资源 (9)
- 收藏
- 关注
原创 排序算法分析
本文是对http://blog.csdn.net/libinjlu/article/details/10948049中排序算法代码实现的分析。1.一些简单排序算法的下界。以数为成员的数组的逆序是指具有性质 i<j 但 a[i]>a[j] 的序偶(i,j)。交换两个不按顺序排列的相邻元素恰好消除一个逆序,而一个排序的数组没有逆序。由于简单插入算法中还有O(N)项其他工作,因此运行时间是O(R+N),其中R为原是数组中的逆序数。
2013-10-24 10:58:03 1304
原创 排序算法实现
对本文出现的排序算法的分析见http://blog.csdn.net/libinjlu/article/details/128592111.插入排序template <typename Comparable>void insertionSort(vector<Comparable>& a){ int j; for(int p=1;p<a.size();p++) { for(j=i-gap;j>=0&&v[j]>v[j+g
2013-10-24 10:56:28 1003
原创 C陷阱与缺陷笔记
1.当计算机启动时,硬件调用首地址为0位置的子例程:(*(void(*)())0)()解释:从里面往外看,先看里面的 void(*)(),这是个函数指针类型,这种类型的对象是函数,该函数无参数和返回值(即void)。
2013-10-17 13:43:10 863
原创 C类型转换函数
1.字符串→整型int atoi(char s[]){ int i,n,sign; for(i=0;isspace(s[i]);i++)//skip front spaces ; sign=(s[i]=='-')? -1:1; if(s[i]=='+'||s[i]=='-') //skip the sign i++;
2013-10-10 14:59:16 1015
原创 数据结构与算法分析:C++描述(Mark Allen Weiss) 和 数据结构(刘大有)笔记
1.在计算机科学中,所有的对数都是以2为底的,除非另有声明。3.如下递归是低效的(计算任何事情不要超过一次)long fib(int n){ if(n<=1) return 1;
2013-10-09 11:03:36 3493
Hands.On.Machine.Learning.with.Scikit.Learn.and.TensorFlow
2017-11-07
Deep Learning 英文原版
2017-11-05
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人