![](https://csdnimg.cn/release/download_crawler_static/87151004/bg4.jpg)
1.1 附件 1:ace 与 GBT19011-2008 标准主要差异性分析
整个快速排序的实现:
voidLinkList::QSort()
{
QueryPerformanceFrequency(&feq);
QueryPerformanceCounter(&t1);
QueryPerformanceCounter(&t2);
double d = ((double)t2.QuadPart - (double)t1.QuadPart) / ((double)feq.QuadPart);//时间差秒
通过设置pos来记录无序边界的位置以减少比较次数。
将数据从前向后两两比较,遇到顺序不对是直接交换两数据的值。
每交换一次movef+3;
voidLinkList::BubbleSort()
QueryPerformanceFrequency(&feq);
QueryPerformanceCounter(&t1);
node * p = front->next;
if (p->data > p->next->data)
node * pos = p; p = front->next;
while (pos != front->next)
if (p->data > p->next->data)
turn(p, p->next); pos = p->next;
}