三种排序算法及三种变量交换的宏实现[1]

[入库:2005年8月19日] [更新:2007年3月24日]

本文简介:选择自 fxsjy 的 blog

1、快速排序

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

#define n 100

#define swap(x,y)                    \

{                                               \

       int t;t=(x);(x)=(y);(y)=t;    \

}

 

 

int partition(int a[],int l,int r);

void quick_sort(int a[],int l,int r);

 

 

本文关键:三种排序算法及三种变量交换的宏实现
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top