![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
文章平均质量分 65
felix_vip
这个作者很懒,什么都没留下…
展开
-
快速排序非递归算法
#include"stdio.h" #define Maxsize 100 void quicksort(int a[],int n) { int i,j,low,high,temp,top=-1; struct node { int low,high; }st[Maxsize]; //栈 top++; st[top].low=0;st[top].high=n-1;//首次入栈 whil转载 2011-03-30 08:52:00 · 516 阅读 · 0 评论 -
#define _INTSIZEOF(n) ((sizeof(n)+sizeof(int)-1)&~(sizeof(int) - 1) ) 的解释
原文地址:http://bbs.chinaunix.net/forum.php?mod=viewthread&tid=814501 _INTSIZEOF(n)的宏是实现在不同平台下,关于字节对齐的计算所用。 对于两个正整数 x, n 总存在整数 q, r 使得 x = nq + r, 其中 0 q, r 是唯一确定的。q = [x/n], r = x - n[转载 2012-10-20 18:37:04 · 1016 阅读 · 0 评论