随笔分类 -  语法

堆排序 Heapsort
摘要:堆排序:由三个函数组成:Max_heapify ( int A[] ,int i ,int heap_size)//堆化 T(n)=log(n);Build_max_heap(int A[],int heap_size)//建堆 T(n)=n ;Heap_sort(int A[],int le... 阅读全文

posted @ 2014-09-04 03:12 蓝 鸟 阅读(202) 评论(0) 推荐(0)

大数阶乘
摘要:一个头疼的程序;计算100以内的阶乘。这是我的程序,可计算10000以内的阶乘: 1 /*Small factorials*/ 2 3 #include 4 int fact(int n); 5 void print(int len); 6 7 int F[200]; 8 9 int mai... 阅读全文

posted @ 2014-07-21 00:13 蓝 鸟 阅读(327) 评论(0) 推荐(0)

导航